Skip to content

docs(tools): correct tool APIs, auth config, and MCP lifecycle - #2025

Open
GWeale wants to merge 3 commits into
google:mainfrom
GWeale:docs-audit-tools
Open

docs(tools): correct tool APIs, auth config, and MCP lifecycle#2025
GWeale wants to merge 3 commits into
google:mainfrom
GWeale:docs-audit-tools

Conversation

@GWeale

@GWeale GWeale commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Corrects drifted API references across the tools pages: imports and attributes that do not exist in v2.5.0, a removed connection-lifecycle pattern, and examples the framework rejects at construction.

Changes

  • docs/tools-custom/authentication.md — the Google API example imported calendar_tool_set, which does not exist (now CalendarToolset, plus GoogleApiToolSetGoogleApiToolset); the external-access-token example passed google_credentials_config to AuthCredential, now BigQueryCredentialsConfig(external_access_token_key=...). Also tool_context.state rather than tool_context.invocation_context.session.state, get_auth_response(auth_config) takes an argument, corrected service_account_credential / scopes requiredness, trueTrue, and adds BaseCredentialService and AuthenticatedFunctionTool.
  • docs/tools-custom/index.md — documented ToolContext.function_call_event_id and auth_response attributes that do not exist; replaced with invocation_id, agent_name, and get_auth_response(auth_config). Notes the artifact/memory methods are async, and documents the tool_filter / tool_name_prefix options on the BaseToolset constructor.
  • docs/tools-custom/mcp-tools.md — the exit_stack cleanup pattern is gone; replaced with await toolset.close() / await runner.close(). Fixes MCPToolsetMcpToolset, getstate/setstate__getstate__/__setstate__, the MCP package name (mcp), the minimum Python (3.10), removes a --staging_bucket flag from the deploy command, and adds StreamableHTTPConnectionParams, the tool_filter predicate form, and the experimental to_mcp_server.
  • docs/tools-custom/function-tools.md — claimed Optional[T] / | None alone makes a parameter optional (it does not; only a default does) and that LongRunningFunctionTool streams generator yields (it calls the function once and does not consume yields). Adds Pydantic-model parameters, AgentTool.include_plugins, and a note that Python prefers a single_turn sub-agent over AgentTool.
  • docs/tools/limitations.md — the examples pairing BuiltInCodeExecutor / url_context with gemini-flash-latest raise a ValueError at construction; pinned to gemini-2.5-flash with a note explaining the gate. Also documents propagate_grounding_metadata on AgentTool and that bypass_multi_tools_limit must be set on a tool instance you construct yourself.
  • docs/tools-custom/openapi-tools.md, docs/tools-custom/confirmation.mdRestApiTool executes asynchronously via httpx, not requests; and a corrected path to the moved confirmation sample.

The gemini-2.5-flash pins in limitations.md are a deliberate exception to this repo's preference for -latest aliases: those two features reject the alias, so the examples cannot run as written otherwise.

How this was produced

Part of a page-by-page audit of the Python docs against the google/adk-python v2.5.0 source: every import resolved against a real 2.5.0 install, every constructor kwarg checked against model_fields / inspect.signature, every documented default read off the field. A second independent pass re-derived each claim from source rather than trusting the finding, and a third conformed the new wording to the surrounding pages. mkdocs build --strict is clean.

Only Python tabs and language-neutral prose were touched — this audit had no ground truth for the Go / Java / TypeScript SDKs.

Split out of a larger audit branch so each area can be reviewed on its own.

@netlify

netlify Bot commented Jul 28, 2026

Copy link
Copy Markdown

Deploy Preview for adk-docs-preview ready!

Name Link
🔨 Latest commit 4d67c6a
🔍 Latest deploy log https://app.netlify.com/projects/adk-docs-preview/deploys/6a6a999576d46000089576a5
😎 Deploy Preview https://deploy-preview-2025--adk-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

GWeale added 2 commits July 30, 2026 00:22
# Conflicts:
#	docs/tools-custom/function-tools.md
#	docs/tools-custom/mcp-tools.md
#	docs/tools-custom/openapi-tools.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant