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" } }When you only need one exported symbol's declaration rather than the full file, use get-type-signature instead — it returns just that declaration:
json
{ "name": "get-type-signature", "arguments": { "slug": "spell", "symbol": "createSchema" } }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.
get-type-signatureonly finds symbols actually exported fromsrc/index.ts(directly or viaexport * from) — it never matches inheritedObject.prototypemember names like"toString"or"constructor", even though those exist on every JS object.