Skip to main content
Glama
Strands Agents MCP Server

Strands Agents MCP Server

Official

fetch_doc

Reads Strands Agents documentation pages by returning a table of contents or a specific section, reducing tokens by fetching only the content needed.

Instructions

Read documentation pages with smart sectioning for token efficiency.

Two modes of operation:

  1. TOC mode (omit section): Returns a table of contents with section IDs, titles, summaries, and the document's preamble so you can decide which part to read.

  2. Section mode (provide section): Returns the full markdown content of one section, identified by the ID from the TOC (e.g., "3" or "3.2").

For small documents (under ~8KB), the full content is returned directly regardless of mode, since sectioning would add overhead without benefit.

Recommended workflow:

  1. search_docs("your query") - find relevant URLs

  2. fetch_doc(uri="...") - see structure, preamble, and section summaries

  3. fetch_doc(uri="...", section="3") - read the section you need

Args: uri: Document URL (must be under https://strandsagents.com/). If empty, returns a catalog of all available document URLs with titles. section: Section ID from the TOC (e.g., "3" or "3.2"). Omit to get the table of contents.

Returns: When section is omitted (TOC mode): - url, title: Document metadata - preamble: Introductory text between page title and first section - sections: List of sections with id, level, title, summary, children

When section is provided:
- url, title: Document metadata
- section_id: Requested section ID
- section_title: Section heading text
- content: Full markdown content of the section

For small documents (under ~8KB):
- url, title: Document metadata
- document_small: true
- content: Full document content (returned automatically)

On error:
- error: Error description
- url: Requested URL

Errors are returned for unsupported URLs and failed page fetches. For
sectioned documents, unknown section IDs also return an error; `section`
is ignored when the full document is returned automatically.

Input Schema

NameRequiredDescriptionDefault
uriNo
sectionNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations present, the description carries the full burden and largely meets it: it discloses the URL restriction to https://strandsagents.com/, the empty-uri catalog fallback, the small-document bypass that silently ignores the section argument, and the error surface for unsupported URLs, failed fetches, and unknown section IDs. What it does not cover is whether responses are cached, rate-limited, or how large a section payload can get, which matters for an agent planning token budget.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The document is long but aggressively front-loaded and scannable: mode enumeration first, workflow second, then Args and Returns blocks. The main redundancy is the Returns section, which restates the response shape that an output schema already defines; trimming that would tighten the definition without losing selection-relevant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-mode fetch tool with zero annotation coverage and zero schema parameter documentation, the description supplies everything an agent needs: mode selection logic, URL scope constraint, the small-document edge case, the empty-uri catalog path, and the error taxonomy. The presence of an output schema makes the enumerated return fields partly redundant but not harmful, and no decision-relevant behavior is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must supply all meaning, and it does: uri is defined as a URL constrained to a specific domain with a documented empty-string sentinel behavior ('returns a catalog of all available document URLs with titles'), and section is defined as an ID sourced from the TOC with example formats ('3' or '3.2') and the explicit default of omitting it. Both parameters, including their non-obvious defaults, are fully disambiguated beyond the bare schema types.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource ('Read documentation pages') modified by a distinctive mechanism ('smart sectioning for token efficiency'), then enumerates the two operating modes with concrete return shapes for each. It is immediately distinguishable from the sibling search_docs, which is explicitly positioned as the discovery step upstream of this fetch step.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It spells out exactly when each mode fires (omit section vs. provide section), names the boundary condition that overrides both (~8KB documents return full content regardless of mode), and provides a numbered three-step workflow that routes the agent between search_docs and two successive calls to this tool. Nothing about selection is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools