Skip to content

docs: document all toolset config options for api, fetch, openapi#2895

Merged
dgageot merged 1 commit into
docker:mainfrom
dgageot:board/397bbd6ff45a4361
May 26, 2026
Merged

docs: document all toolset config options for api, fetch, openapi#2895
dgageot merged 1 commit into
docker:mainfrom
dgageot:board/397bbd6ff45a4361

Conversation

@dgageot
Copy link
Copy Markdown
Member

@dgageot dgageot commented May 26, 2026

These docs fill gaps in the coverage of fetch, api, and openapi toolset configuration. The updates close missing documentation for recently added config fields and correct a couple of outdated claims.

For fetch, we document the headers option, add a "Custom headers" section with an example, and correct an old callout claiming that fetch has no custom header support. The api toolset docs now clearly structure Properties into toolset-level fields (api_config, timeout, allow_private_ips) and the api_config block itself, document the ${env.VAR} and ${headers.NAME} placeholder support on headers, clarify that output_schema is consumed by MCP/Code Mode while runtime returns raw strings, and fix a claim that ${param} automatically URL-encodes values (it does not). We add an example for reaching internal services with an SSRF callout, and update the Limitations section. The openapi docs get timeout and allow_private_ips in the Properties table, clarified placeholder support with a note that headers are also sent on the spec fetch, and new "Custom timeout" and "Reaching internal services" sections.

These changes were verified against the source of truth in pkg/config/latest/types.go, the tool implementations, pkg/upstream/headers.go, and agent-schema.json.

- Add timeout and allow_private_ips to api and openapi toolsets
- Restructure api properties into toolset-level and api_config tables
- Document placeholder support: ${env.VAR} and ${headers.NAME}
- Document custom headers support in fetch
- Fix outdated callout claiming fetch has no custom headers
- Add examples for reaching internal services with SSRF warnings
@dgageot dgageot requested a review from a team as a code owner May 26, 2026 09:41
Copy link
Copy Markdown

@docker-agent docker-agent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: 🟢 APPROVE

Reviewed docs/tools/api/index.md, docs/tools/fetch/index.md, and docs/tools/openapi/index.md.

Verified against source of truth:

  • pkg/tools/builtin/api/api.go — confirms timeout/allow_private_ips fields, JS expander for ${param} (Goja, full ECMAScript), and upstream.ResolveHeaders for ${headers.NAME} support
  • pkg/tools/builtin/fetch/fetch.go — confirms custom headers applied last (override Accept/User-Agent), env-only expansion at startup, and per-redirect header stripping
  • pkg/tools/builtin/openapi/openapi.go — confirms timeout applies to both spec fetch and generated tool calls, and ${headers.NAME} is resolved at request time
  • pkg/upstream/headers.go — confirms ${headers.NAME} placeholder semantics
  • agent-schema.json — confirms api_config required for type: api, timeout/allow_private_ips as toolset-level fields
  • Go 1.26.3 stdlib — confirms Www-Authenticate is treated as a sensitive header stripped on cross-domain redirects (consistent with the fetch callout's claim)
  • Goja runtime — encodeURIComponent is a standard ECMAScript built-in and works correctly in Goja (confirmed by running the function)

All documented behavior matches the implementation. No issues found in the changed code.

@aheritier aheritier added area/tools For features/issues/fixes related to the usage of built-in and MCP tools kind/docs Documentation-only changes labels May 26, 2026
@dgageot dgageot merged commit 1fc16fd into docker:main May 26, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/tools For features/issues/fixes related to the usage of built-in and MCP tools kind/docs Documentation-only changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants