Skip to main content

Filter: gk/block-mcp/agent/role

Run the AI agent on a role you control instead of the built-in one.

By default the plugin registers and manages a tidy block_mcp_agent role for you. Return your own slug here when you already govern capabilities centrally — say a membership plugin, a compliance policy, or a shared "content bot" role across several tools. The moment you return a custom slug, the plugin steps back and stops creating or modifying the role, so it's yours to define.

Parameters

NameTypeDescription
$rolestringRole slug for the agent account. Default 'block_mcp_agent'.

Example

// Assign the agent to a role your team already manages.

add_filter( 'gk/block-mcp/agent/role', function () {
return 'content_automation';
} );

Since

Source

Defined in wordpress-plugin/gk-block-api/includes/class-agent-provisioner.php at line 134