How do you force the agent to use an MCP server? From my experience it can be tricky to get an agent to call an MCP server in the first place. This must require something beyond instructions in the CLAUDE.md.
UserPromptSubmit hook: injects state context into every prompt... phase, available tools
Instructions: the model sees transition() and get_state() as MCP tools it can call. PreToolUse hook blocks disallowed tools at execution time and returns an error with what IS available.
PostToolUse hook: detects file changes and fires interrupts.
Things in CLAUDE.md are merely suggestions, hooks are enforcement. The model can rationalize away instructions but it can't rationalize away a blocked tool call.
The Pi plugin takes this further... pi's extension API lets us remove tools from the model's view entirely via setActiveTools() so it never even sees what it can't use. smaller tool space, better reasoning. Better Pi support is a recent enhancement and it's getting better.
UserPromptSubmit hook: injects state context into every prompt... phase, available tools
Instructions: the model sees transition() and get_state() as MCP tools it can call. PreToolUse hook blocks disallowed tools at execution time and returns an error with what IS available.
PostToolUse hook: detects file changes and fires interrupts.
Things in CLAUDE.md are merely suggestions, hooks are enforcement. The model can rationalize away instructions but it can't rationalize away a blocked tool call.
The Pi plugin takes this further... pi's extension API lets us remove tools from the model's view entirely via setActiveTools() so it never even sees what it can't use. smaller tool space, better reasoning. Better Pi support is a recent enhancement and it's getting better.