code_read
Read a source file from an indexed npm, PyPI, or crates package using a package-scoped path, enabling dependency source inspection without cloning.
Instructions
Read a file from an indexed dependency by package-scoped path. PkgSeer + jsDelivr; indexes npm/pypi/crates ONLY (github: specs rejected). e.g. code_read(spec='npm:express', path='src/index.js')
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": {
"spec": "<spec>",
"path": "<path>"
},
"name": "code_read"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File path within the package (e.g. src/index.js) | |
| spec | Yes | Package spec: registry:name[@version] (e.g. npm:express) |