Skip to main content
Glama

OnchainCheck Dev Docs

Package docs

package_docs
Read-onlyIdempotent

Package docs and source for coding agents, in one call: give an npm or PyPI package name (and optional version) and get its README as Markdown, description, license, repository, entry points and types, exports, dependencies and the full file list; pass file= to read one source or type file (npm). From the npm registry, jsDelivr and PyPI. Costs $0.003 USDC on Base via x402.

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": {
      "name": "<name>"
    },
    "name": "package_docs"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNonpm only: a path from files to read (src/index.ts, dist/index.d.ts)
nameYesPackage name, optionally with @version (react, @types/node, requests, expo-widgets@58.0.29)
readmeNofalse leaves out the README (default true)
versionNoVersion or dist-tag (default latest)
registryNonpm (default) or pypi

Output Schema

NameRequiredDescriptionDefault
nameNostring, e.g. "zod"
entryNoobject
filesNoarray
notesNostring, e.g. "From the npm registry (the version's package.json) and jsDe
readmeNostring, e.g. "<p align=\"center\">\n <img src=\"logo.svg\" width=\"200px
enginesNonull, e.g. null
licenseNostring, e.g. "MIT"
versionNostring, e.g. "4.6.7"
homepageNostring, e.g. "https://zod.dev"
keywordsNoarray
registryNostring, e.g. "npm"
fetchedAtNostring, e.g. "2026-11-27T04:17:07.554Z"
fileCountNonumber, e.g. 840
deprecatedNonull, e.g. null
readmeFileNostring, e.g. "README.md"
repositoryNostring, e.g. "https://github.com/colinhacks/zod"
descriptionNostring, e.g. "TypeScript-first schema declaration and validation library
dependenciesNoobject
unpackedSizeNonumber, e.g. 6148944
filesTruncatedNoboolean, e.g. true
readmeTruncatedNoboolean, e.g. false
peerDependenciesNoobject

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations (readOnly, idempotent, openWorld, non-destructive), it discloses the paid-access requirement and mechanism — $0.003 USDC on Base via x402 — which an agent must know before calling. It also reveals the upstream data sources (npm registry, jsDelivr, PyPI) and the npm-only constraint on file reads.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose, then the two usage modes, then provenance and cost — a sensible order with no filler. The main clause is a long semicolon-chained enumeration of returned artifacts that could be tightened, but every element is informative.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, yet the description still gives a useful summary of the payload, plus payment, data provenance, and the npm restriction on file reads. Nothing an agent needs to invoke it correctly appears to be missing for a 5-parameter read-only tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents name/version/registry/readme/file semantics. The description largely restates those (name with version, file=<path>, npm-only), adding no new syntax or format detail, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('package docs and source ... in one call') and enumerates exactly what is returned: README as Markdown, description, license, repository, entry points, types, exports, dependencies, file list. The mention of registries (npm, jsDelivr, PyPI) makes it unmistakably a docs/source-fetching tool, differentiable from a package_check-style sibling.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Clear usage context: supply a package name plus optional version for full docs, or pass file=<path> to read a single source/type file, and notes that the file mode is npm-only. It does not name an alternative tool or state when NOT to use this one (e.g. existence/version checking), so it falls short of full routing guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources