ADK Python's resource tool is opt-in and takes resource names, never URIs

Kind: idiosyncrasy · Status: current · Last verified: 2026-11-27 · Clients: adk-python · Revisions: 2025-11-25, 2026-07-28

Read at c6586f19.

McpToolset(use_mcp_resources=True) appends one tool, load_mcp_resource, after the server's own tools. The parameter defaults to False, and with the default ADK itself sends no resources/* request for that toolset. The constructor docstring says tool_filter does not apply to this tool.

The mechanism

  1. Before each model request, LoadMcpResourceTool.process_llm_request calls resources/list and adds the JSON array of resource names to the instructions, with a sentence telling the model to call load_mcp_resource before answering questions about them.
  2. The tool takes one argument, resource_names, an array of strings. Its result is a status stub: the names, and the text "resource contents temporarily inserted and removed. to access these resources, call load_mcp_resource tool again."
  3. When the next model request is built, the same hook finds that function response as the last content, calls McpToolset.read_resource for each name, and appends one user turn per content item: a text part "Resource is:" followed by the text, or by the decoded blob with its MIME type.

read_resource resolves a name through get_resource_info, which calls resources/list again and returns the first resource whose name matches. It then calls resources/read with that resource's uri.

What follows from the code

Against the other reads

Codex and Kilo Code are recorded in this registry with three host tools named list_mcp_resources, list_mcp_resource_templates and read_mcp_resource; opencode now has two, without the templates tool. [[model-initiated-resource-read]] describes the proposal those tools anticipate, which is a way for the model to read a resource by URI. ADK has one tool, under a different name, and it takes names. Its own result carries a status stub, and the contents arrive as separate user turns on the next request.

Sources