nction is_destructive(): bool { return false !== ( $this->definition()->meta['annotations']['destructive'] ?? true ); } protected function definition(): Ability_Definition { if ( null === $this->cached_definition ) { $this->cached_definition = $this->get_definition(); } return $this->cached_definition; } private function mcp_meta(): array { $meta = $this->definition()->meta; return is_array( $meta['mcp'] ?? null ) ? $meta['mcp'] : []; } private function maybe_append_unavailable_notice( string $description ): string { $availability = $this->is_available(); if ( ! is_wp_error( $availability ) ) { return $description; } $data = $availability->get_error_data(); $notice = is_array( $data ) && isset( $data['description_notice'] ) ? (string) $data['description_notice'] : $availability->get_error_message(); if ( '' === $notice ) { return $description; } return '' === $description ? $notice : rtrim( $description ) . ' ' . $notice; } }