wp-includes/ai-client/class-wp-ai-client-prompt-builder.php:237Registers WordPress abilities as function declarations for the AI model.
$abilitiesWP_Ability|stringself public function using_abilities( ...$abilities ): self { $declarations = array(); foreach ( $abilities as $ability ) { if ( is_string( $ability ) ) { $ability_name = $ability; $ability = wp_get_ability( $ability ); if ( ! $ability ) { _doing_it_wrong( __METHOD__, sprintf( /* translators: %s: string value of the ability name. */ __( 'The ability %s was not found.' ), '<code>' . esc_html( $ability_name ) . '</code>' ), '7.0.0' ); continue; } } // This is only here as a sanity check, the method signature should ensure this already. if ( ! $ability instanceof WP_Ability ) { continue; } $function_name = WP_AI_Client_Ability_Function_Resolver::ability_name_to_function_name( $ability->get_name() ); $input_schema = $ability->get_input_schema(); $declarations[] = new FunctionDeclaration( $function_name, $ability->get_description(), ! empty( $input_schema ) ? $input_schema : null ); } if ( ! empty( $declarations ) ) { return $this->using_function_declarations( ...$declarations ); } return $this; }Introduced in 7.0.0. Unchanged from 7.0.4 through 7.1.0.
Signature, return type and hooks compared across 2 parsed releases.
src/wp-includes/ai-client/class-wp-ai-client-prompt-builder.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.