Skip to main content

inject_operator

Function inject_operator 

Source
pub fn inject_operator(config: Config, is_internal: bool) -> Config
Expand description

Inject the Operator MCP server into config.

For non-internal agents this:

  1. Ensures config.mcp.enabled = true.
  2. Prepends the Operator server to config.mcp.servers (if not already present).

The operator system-prompt text is handled separately: call append_operator_prompt on the assembled system_prompt string in the agent run loop (after append_kumiho_bootstrap).

Internal agents (is_internal = true) are left untouched.

The function is intentionally idempotent: a second call for the same config will not duplicate the server because it checks for existing entries by server name.