Skip to main content
Glama

get_claude_code_doc_content

Read-only

Read a Claude Code documentation page from a search result URL, fetching live content and removing injected index/widget markup; use an optional sectionId to target a specific section.

Instructions

Read a Claude Code documentation page from https://code.claude.com/docs/en/. Use after search_claude_code_docs with one of the returned page URLs. The page is checked against the live docs index, fetched live with no cached fallback, and its text is returned with the injected index blockquote and widget source removed. The bare page slug as sectionId (the page path without .md, e.g. hooks or agent-sdk/typescript) reads the page intro, the text before the first section, when the page has text before its first section; otherwise the read is NOT_FOUND. The sectionId of a level-2 heading that has level-3 subsections returns only its lead (the text before the first subsection); each subsection has its own sectionId. The changelog page (https://code.claude.com/docs/en/changelog.md) is refused for any read, with or without sectionId; use get_claude_code_changelog.

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": "get_claude_code_doc_content"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesFull URL of a Claude Code documentation page. Must start with https://code.claude.com/docs/en/ and end in .md (as returned by search_claude_code_docs). Example: "https://code.claude.com/docs/en/hooks.md".
sectionIdNoExact sectionId returned by search_claude_code_docs (format <page-slug>--<heading-slug>[--...][~N]); omit it to read the whole page. The sectionId of a level-2 heading that has level-3 subsections returns only its lead (the text before the first subsection); each subsection has its own sectionId.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv5.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Beyond readOnlyHint=true, it discloses live-index validation, no cached fallback, and that the injected index blockquote and widget source are stripped from returned text. It also documents a hard refusal case (changelog) and a NOT_FOUND condition, which the annotations cannot express.

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?

Purpose and prerequisite are front-loaded, and most sentences carry unique constraints. Minor redundancy: the level-2/level-3 subsection rule is restated in both the description and the sectionId schema field, costing a sentence.

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?

For a two-parameter read tool with no output schema, it covers edge cases well (intro reads, nesting behavior, refusals, sanitization). The one gap is response shape — it says text is returned but not whether metadata, headings, or pagination accompany it.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline would be 3, but the description adds real meaning: a bare page slug as sectionId reads only the intro and returns NOT_FOUND if no pre-section text exists, and a level-2 heading with level-3 children yields only its lead. That intro/NOT_FOUND nuance goes beyond the schema, though the level-2 caveat is duplicated from the schema.

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 concrete verb and resource — 'Read a Claude Code documentation page from https://code.claude.com/docs/en/' — and implicitly separates itself from search_claude_code_docs (which produces URLs) and get_claude_code_changelog (which owns the changelog page). An agent can tell what this does without opening the schema.

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 prescribes the sequence: 'Use after search_claude_code_docs with one of the returned page URLs.' It also names an exclusion and a substitute — the changelog page is 'refused for any read, with or without sectionId; use get_claude_code_changelog.' When-to-use, when-not, and the alternative are all stated.

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