Filter: gform_mcp_public_ability
Filters whether an ability is publicly exposed to MCP clients.
Per-tool settings take priority. A tool the admin has not enabled is forced private (and hidden from REST) after this filter is applied.
Parameters
| Name | Type | Description |
|---|---|---|
| $is_public | bool | Whether the ability is public to MCP clients. |
| $definition | array | The ability definition. |
Example
add_filter( 'gform_mcp_public_ability', function( $is_public, $definition ) {
if ( $definition['name'] === 'gravityforms/system-info' ) {
return false;
}
return $is_public;
}, 10, 2 );
Since
- 3.1.0
Source
Defined in includes/abilities/class-gf-abilities-service-provider.php at line 358
Returns
Whether the ability is public.