Agent Framework's Python binding offers every MCP prompt to the model as a tool

Kind: idiosyncrasy · Status: current · Last verified: 2026-11-16 · Clients: agent-framework · Revisions: 2025-11-25, 2026-07-28

The MCP specification describes prompts as user-controlled: templates a person picks, which enter the conversation as messages. The Python binding of Agent Framework, read at 10801303, gives them to the model.

MCPTool takes load_prompts: bool = True. When the server declares the prompts capability, connect calls prompts/list, following cursors up to 100 pages and 1,000 prompts. Each prompt becomes a FunctionTool whose name is the normalised prompt name, whose description is the prompt's description, and whose input schema is an object with one string property per prompt argument. It is appended to self._functions, the same list that holds the server's tools. Agent adds mcp_server.functions to each run, so the model sees prompts and tools side by side with nothing marking which is which.

When the model calls one, the framework sends prompts/get with the arguments and passes the result through _parse_prompt_result_from_mcp. Text content is kept as it is. Image, audio and blob content become JSON objects holding the base64 data. A resource link becomes its JSON dump. One part is returned alone, and several parts are returned as a JSON array of strings. message.role is not read. The string goes back to the model as the tool result.

What follows from sharing the function list:

load_prompts=False turns all of this off. The framework's own declarative workflow handler constructs its tool that way.

Nothing in the binding inserts a prompt's messages into the conversation as user or assistant messages, and nothing offers a prompt to a person. MCPTool.get_prompt is public, so application code can fetch one and use the string itself.

The .NET binding does not call prompts/list or prompts/get anywhere under dotnet/src.

Sources