Skip to main content

local_agent_refusal

Function local_agent_refusal 

Source
pub fn local_agent_refusal(
    policy: LocalAgents,
    headers: &HeaderMap,
) -> Option<&'static str>
Expand description

Why a call must be refused under the local-agent policy, None = serve it.

With off the whole endpoint is refused for every token: the built-in assistant calls the tools in-process, so every HTTP MCP client is an agent outside the server (the desktop’s Agent view, the teamcraft mcp bridge, an assistant set up by hand). LOCAL_AGENT_HEADER only picks the message; leaving it out changes nothing. Pure, for tests.