Fetch Doc
fetch_docFetches documentation pages as clean Markdown for LLM consumption from Ansible docs, Red Hat docs, or CoP README URLs found by search_docs, with optional token limits.
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).
docs.redhat.com URLs are fetched over unauthenticated public HTTP
(HTML → markdown, soft-404 detection, /html/ rewriting). When public
retrieval fails (bot protection, HTTP errors, not-found pages), the
error explains how to connect the GA Red Hat Documentation MCP server
(https://docs-mcp.api.redhat.com/mcp) directly in your AI client.
search_docs with the aap-2.5/aap-2.6/aap-2.7 sources uses
shipped local manifests and is unaffected.
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
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | A docs.ansible.com, docs.redhat.com, or CoP raw GitHub README.adoc URL from search_docs hits, to fetch as markdown | |
| max_tokens | No | 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. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |