Skip to main content
Glama
Timwal78

ScriptDocs MCP Server

Resolve Library Name

docs_resolve_library
Read-onlyIdempotent

Resolve fuzzy or partial package names into real, ranked candidates using live registry search for npm and Cargo, with clear guidance when PyPI search is unavailable.

Instructions

Turn a fuzzy or partial name into real, ranked candidate package names, using the registry's own live search index — not a guess at what the package is probably called.

For npm this queries registry.npmjs.org's actual search API (the same one npmjs.com uses). For Cargo this queries crates.io's real search endpoint. For PyPI: there is currently no official PyPI search API (XML-RPC search was permanently disabled in 2022 and never replaced) — calling this with ecosystem 'pypi' returns an explicit message saying so rather than a fabricated or scraped result, along with a suggestion to use the exact package name with docs_get_package_info instead.

Args:

  • ecosystem ('npm' | 'pypi' | 'cargo')

  • query (string): the name or description to resolve, e.g. "react" or "async http client"

  • max_results (number, 1-10, default 5)

Returns JSON with: candidates (array of {name, version, description, score, url}), source_url, fetched_at.

Error Handling:

  • ecosystem 'pypi' always returns an explanatory message, not an error and not fabricated results

  • Returns "Error: ..." only for actual npm/crates.io request failures

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesNatural-language or partial name to resolve, e.g. 'react', 'http client for python', 'serde'.
ecosystemYesWhich registry to search: 'npm', 'pypi', or 'cargo'. Note: PyPI has no official search API (see limitation below).
max_resultsNoMaximum number of candidates to return.
Behavior5/5

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

The description adds detail beyond the readOnly/idempotent hints by specifying the exact live search endpoints (npmjs.com and crates.io) and explaining that PyPI calls return an explicit explanatory message rather than fabricated results. It also specifies the exact error condition ('Error: ...' only on real request failures) and the return JSON shape, which is not available from an output schema.

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 front-loaded with a clear one-sentence purpose, then uses labeled sections (Args, Returns, Error Handling) to keep details scannable. Although it goes into depth on the pypi limitation, each sentence earns its place, and the structure prevents it from feeling bloated.

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?

There is no output schema, but the description fully specifies the return JSON structure (candidates, source_url, fetched_at) and covers error handling and ecosystem-specific behavior. It also provides a fallback suggestion for PyPI, making the tool's behavior predictable and complete.

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

Parameters4/5

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

The input schema already provides 100% coverage with descriptions for all three parameters, so the baseline is 3. The description adds concrete query examples ('react' or 'async http client'), the per-ecosystem search API mapping, and the note that max_results defaults to 5. This adds practical color, but the schema already captures the essential constraints, so a 4 rather than 5 is appropriate.

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 opens with a specific, action-oriented statement ('Turn a fuzzy or partial name into real, ranked candidate package names, using the registry's own live search index'), which clearly defines the tool's output and approach. It also differentiates this from the sibling docs_get_package_info by naming it as the alternative for exact lookups, distinguishing this tool's search/resolution purpose.

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

Usage Guidelines5/5

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

It explicitly says when to use this tool (fuzzy or partial name → real candidates) and when not to: for PyPI it states there is no official search API and recommends using docs_get_package_info with the exact package name instead. It also clarifies per-ecosystem behavior, giving agents actionable context for choosing this tool.

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/Timwal78/scriptdocs-mcp-server'

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