Skip to main content
Glama

fetch_doc

Read-only

Fetch a documentation page as clean Markdown, making it ready for LLM consumption. Use with search_docs URLs from approved docs.ansible.com, docs.redhat.com, or CoP raw GitHub sources.

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).

Input Schema

TableJSON 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

TableJSON 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 declare readOnlyHint=true, and the description does not contradict this. Beyond that, it adds useful behavioral context: output is converted to clean Markdown, intended for LLM consumption, and only specific URL sources are accepted. It does not disclose network failure modes or rate limits, but with read-only annotation coverage this is a reasonable level of disclosure.

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

Conciseness5/5

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

The description is short, front-loaded with the core action, and every sentence earns its place. The URL allowlist and the pointer to search_docs are essential operational details, not filler.

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-parameter read-only fetch tool with a full output schema and 100% parameter documentation, the description is complete. It tells the agent what the tool does, what input is valid, how to discover inputs, and what output to expect. Nothing essential for correct invocation is missing.

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?

The schema has 100% description coverage, so the heavy lifting is already done by the input schema. The description mostly repeats the URL constraints already present in the url parameter description. max_tokens is fully documented in the schema. The description adds no significant semantic detail beyond the structured parameter documentation.

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 uses a specific verb and resource: 'Fetch a docs page as clean Markdown.' It clearly states the output form and distinguishes this from discovery tools like search_docs, which are described separately and referenced as the way to find URLs. The tool's identity is unambiguous.

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

Usage Guidelines4/5

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

The description explicitly instructs agents to 'Use search_docs to discover relevant page URLs' and constrains acceptable inputs to docs.ansible.com, docs.redhat.com, or CoP raw GitHub README.adoc URLs. It clearly excludes arbitrary raw.githubusercontent.com hosts. It does not explicitly contrast fetch_doc with siblings like get_module_doc or get_plugin_doc, so exclusions are not fully exhaustive.

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