Skip to main content
Glama

Fetch Doc

fetch_doc
Read-only

Fetch Ansible or Red Hat documentation pages as clean Markdown ready for LLM consumption, using page URLs returned by search_docs.

Instructions

Fetch a docs page as clean Markdown.

Returns documentation content ready for LLM consumption. Use search_docs to discover relevant page URLs. Accepts docs.ansible.com, docs.redhat.com, or CoP good-practices raw GitHub README.adoc URLs from search_docs hits (not arbitrary raw.githubusercontent.com hosts).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "url": "<url>"
    },
    "name": "fetch_doc"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesA docs.ansible.com, docs.redhat.com, or CoP raw GitHub README.adoc URL from search_docs hits, to fetch as markdown
max_tokensNoIf set, return error instead of content when the page exceeds this token count. docs.ansible.com uses the x-markdown-tokens response header; CoP and Embed estimate tokens from the fetched body.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.10.0
    • changedInput schema / properties / max_tokens / description
      Previous value: -"If set, return error instead of content when the page exceeds this token count. Checked after fetching via the x-markdown-tokens response header."New value: +"If set, return error instead of content when the page exceeds this token count. docs.ansible.com uses the x-markdown-tokens response header; CoP and Embed estimate tokens from the fetched body."
    • changedInput schema / properties / url / description
      Previous value: -"A docs.ansible.com or docs.redhat.com URL to fetch as markdown"New value: +"A docs.ansible.com, docs.redhat.com, or CoP raw GitHub README.adoc URL from search_docs hits, to fetch as markdown"
  2. Changed1 schema field changedv0.8.0
    • changedInput schema / properties / url / description
      Previous value: -"A docs.ansible.com URL to fetch as markdown"New value: +"A docs.ansible.com or docs.redhat.com URL to fetch as markdown"
  3. First observedv0.7.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=true, so the description carries the rest: it discloses that content is transformed into Markdown for LLM consumption and that only a specific set of hosts is fetched, which prevents failed calls. It does not discuss rate limits, caching, or error surfaces for disallowed hosts, so it falls short of fully transparent.

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?

Four short sentences, front-loaded with what the tool does and its output, followed by the prerequisite and the host constraint. Minor redundancy between 'clean Markdown' and 'documentation content ready for LLM consumption', but nothing is wasteful.

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

Completeness4/5

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

With an output schema present and both parameters fully documented, the description need only cover scope and prerequisites, which it does. It could say what happens when a non-allowed URL is passed, but that is a small gap for a two-parameter read tool.

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

Parameters3/5

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

Schema coverage is 100% and the url parameter description already contains the identical host allowlist, so the description largely restates structured data. It adds no syntax, encoding, or format guidance for url or max_tokens beyond what the schema documents.

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?

States a specific verb and resource ('Fetch a docs page as clean Markdown') and immediately clarifies the output form ('ready for LLM consumption'). This is clearly distinct from the sibling search_docs, which only discovers URLs.

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?

Explicitly routes the agent through search_docs first to obtain URLs, enumerates the three accepted host families, and names the exclusion ('not arbitrary raw.githubusercontent.com hosts'). Both when-to-use and when-not-to-use are covered.

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