Reading Docs
Problem
You need the full documentation content for a package page — the usage guide, API reference, or examples — to answer a question or generate code.
Solution
Call get-docs with packageSlug and the desired page. The page defaults to "index" if omitted.
Default page (index)
json
{ "name": "get-docs", "arguments": { "packageSlug": "spell" } }Specific page
json
{ "name": "get-docs", "arguments": { "packageSlug": "spell", "page": "api" } }Available pages: index, api, usage, examples.
Source entrypoint
To read src/index.ts instead of a documentation page, use the dedicated tool:
json
{ "name": "get-source", "arguments": { "packageSlug": "spell" } }Pitfalls
pageonly accepts the four doc page values. Passing"source"returnsisError: true; useget-sourcefor source access.- Not every package has every page. Check
availableDocPagesfromlist-packagesfirst to avoid an error on a missing page. - The returned content is raw Markdown, not HTML. Parse it or pass it directly to a language model.