Skip to main content
Glama

Exported API surface of a package

package_api

Look up the real exported API and type signatures of any npm package version from TypeScript declarations. Verify exact names and signatures to avoid inventing APIs.

Instructions

Get the REAL exported API — functions, classes, constants, interfaces, types — of an npm package at a specific version, extracted from its published TypeScript declarations (.d.ts). Reach for this WHENEVER you're about to call into a library and aren't 100% certain a function/option exists with that exact name and signature. It is the antidote to inventing APIs: if it isn't in this list, the package doesn't export it. Grouped by kind, with one-line signatures.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entryNoOverride the .d.ts entry path (e.g. 'dist/index.d.ts') if auto-detection misses it.
packageYesnpm package name, e.g. 'zod', 'date-fns', '@tanstack/react-query'.
versionNoExact version or dist-tag (e.g. '3.23.8', 'latest', 'next'). Defaults to 'latest'.
Behavior4/5

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

No annotations are provided, so the description carries full burden. It discloses that the API is extracted from published TypeScript declarations (.d.ts), a key behavioral constraint, and reveals the output structure ('Grouped by kind, with one-line signatures'). Edge cases like missing .d.ts files aren't covered, but for a read-only introspection tool this is reasonably transparent.

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?

The description is three sentences and front-loaded with the core purpose, with each sentence contributing what, when, and why. There is minor redundancy ('antidote to inventing APIs' restates the previous sentence), but overall it's efficient.

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

Completeness3/5

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

With no output schema, the description gives a partial return shape ('Grouped by kind, with one-line signatures') but doesn't elaborate on the exact structure or error behavior. It covers the main use case well but lacks sufficient detail about limitations, given the tool's complexity.

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?

The input schema already provides 100% description coverage for all three parameters (package, version, entry), so the baseline is 3. The description echoes the version concept but adds no additional semantics beyond what the schema documents.

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?

The description uses a specific verb 'Get' with a precise resource ('REAL exported API' of an npm package at a specific version) and explicitly enumerates what's included (functions, classes, constants, interfaces, types). It distinguishes itself from sibling tools by claiming to be the authoritative source ('antidote to inventing APIs: if it isn't in this list, the package doesn't export it').

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?

The description provides an explicit when-to-use: 'Reach for this WHENEVER you're about to call into a library and aren't 100% certain a function/option exists with that exact name and signature.' This is clear context, though it does not name sibling tools or exclusions, so it stops short of a 5.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Anicodeth/pkg-api-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server