Skip to main content
Glama
rakeshmenon

npmlens-mcp

by rakeshmenon

get_usage_snippet

Extract likely usage snippets from npm package READMEs to quickly understand how to use a package.

Instructions

Extract a likely usage snippet from a package's README.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
versionNo
Behavior2/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It mentions 'likely' suggesting heuristic behavior, but does not disclose limitations (e.g., what happens if the README has no usage snippet), return format, or whether network requests or certain permissions are involved. Minimal information beyond the basic action.

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

Conciseness5/5

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

The description is a single, front-loaded sentence with no unnecessary words. It immediately states the action and target. All essential information is presented efficiently.

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

Completeness2/5

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

For a tool with no output schema and no annotations, the description is incomplete. It does not explain what a 'usage snippet' looks like, how version affects the result, or any edge cases. Given the existence of many sibling tools, more context is needed for an agent to select this tool correctly.

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

Parameters2/5

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

Input schema has 0% description coverage, and the description does not elaborate on the parameters. While 'name' is self-explanatory, 'version' is not explained—whether it is optional, how it affects the extraction, or its format. The description fails to compensate for the lack of schema-level parameter details.

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 clearly states the tool extracts a usage snippet from a package's README. This distinguishes it from sibling tools like get_readme (which likely fetches the full README) and search_npm (which searches packages). The verb 'extract' and the resource 'usage snippet' are specific and unambiguous.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives such as get_readme or get_package_info. It does not mention prerequisites, exclusions, or any contextual triggers. The usage is only implied by the tool's name and description, but no explicit guidance is given.

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/rakeshmenon/npmlens-mcp'

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