Read a doc
read_docFetch the complete text of a documentation entry, SDK README, or recipe by providing its stable ID returned by search or list tools.
Instructions
Fetch the full content of a doc, SDK README, recipe, or other entry by id (as returned by search_docs or list_docs).
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": {
"id": "<id>"
},
"name": "read_doc"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Stable id returned by search/list, e.g. `docs/STRUCTURE`, `sdks/typescript`, `recipes/livekit-realtime-agent`. |
Implementation Reference
- src/lib/content.ts:139-143 (helper)The getEntry() helper function that is called by the read_doc handler to look up a ContentEntry by its id slug (normalized via makeId).
export async function getEntry(id: string): Promise<ContentEntry | undefined> { const all = await loadContent(); const norm = makeId(id); return all.find((e) => e.id === norm); } - src/lib/content.ts:97-100 (helper)The makeId() helper used within getEntry() to normalize paths by stripping file extensions and normalizing slashes.
function makeId(relPath: string): string { // strip extension; normalise slashes return relPath.replace(/\\/g, "/").replace(/\.(md|mdx|json|yaml|yml)$/i, ""); }