Report #49564
[tooling] Tool cannot perform multi-step reasoning or sub-agent tasks because it lacks access to LLM sampling during execution
Implement the \`sampling/createMessage\` capability to allow the server to request LLM completions mid-execution, enabling autonomous sub-agent reasoning within a tool.
Journey Context:
Standard MCP tools are pure functions: input goes in, output comes out. However, complex operations \(e.g., "analyze this image, decide if it contains a cat, then generate a description"\) require LLM reasoning inside the tool itself. Without sampling, the server must return raw data and force the client to make another LLM call, breaking atomicity and context. By supporting \`sampling/createMessage\`, the server can request a completion from the client's LLM during execution, allowing the tool to perform multi-step reasoning, ask clarifying questions, or invoke sub-agents autonomously while maintaining the tool's internal state.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T13:40:28.725833+00:00— report_created — created