Raw TypeScript declarations of a package
package_typesRetrieve the raw .d.ts type declarations for an npm package@version to get exact signatures, generics, overloads, and option-object shapes that summaries miss.
Instructions
Return the raw .d.ts declaration text for an npm package@version — the ground-truth type definitions. Use when you need exact signatures, generic parameters, overloads, or option-object shapes that a summary can't capture (e.g. the precise props of a component or the full options of a function). Defaults to the package's types entry; pass file (from list_type_files) to read a specific declaration file.
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": {
"package": "<package>"
},
"name": "package_types"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | Specific .d.ts path to read (from list_type_files). Defaults to the types entry. | |
| package | Yes | npm package name. | |
| version | No | Version or dist-tag. Defaults to 'latest'. | |
| maxChars | No | Truncate output (default 16000) to protect the context window. |