Skip to main content
Glama

resolveLibraryId

Read-onlyIdempotent

Resolve any library or package name to its Context7 library ID for official documentation. Use when you need reliable docs without web search or proxy.

Instructions

PREFERRED for official docs: resolve a library/package name to a Context7 library ID (e.g. /vercel/next.js). Use this (then queryDocs) FIRST when the task needs official library/framework documentation — more reliable than web search and works without a proxy.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of library matches to return (default 5)
queryNoThe user's question or task, used to rank results by relevance (optional; defaults to the library name when omitted, e.g. 'how to implement authentication')
libraryNameYesThe library or package name to search for (e.g. 'Next.js', 'express', 'prisma')
Install Server

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint, and non-destructive. The description adds operational context beyond annotations: proxy-independent behavior and reliability relative to web search. These behavioral traits help the agent decide under network constraints.

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?

Two tight sentences: the first states purpose with an example, the second gives usage priority and comparison. There is no filler, and the key directives ('PREFERRED', 'FIRST') are front-loaded.

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

Completeness4/5

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

For a simple lookup tool, the description covers when to use it, what it returns (a Context7 library ID with an example format), and how to chain it with queryDocs. With no output schema, the gap around empty results or error behavior is minor but not fully addressed.

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 covers 100% of parameters with clear descriptions, so the baseline applies. The description adds a useful output example and implies the query-reranking behavior, but does not materially enhance parameter understanding beyond the schema.

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 states a specific verb and resource — 'resolve a library/package name to a Context7 library ID' — and provides a concrete example ('/vercel/next.js'). It clearly differentiates the tool from queryDocs and web search by positioning it as the resolution step before queryDocs.

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 tells the agent when to use the tool ('when the task needs official library/framework documentation'), in what order ('then queryDocs'), and why it beats alternatives ('more reliable than web search and works without a proxy'). This is direct, actionable selection guidance.

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

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/wtznicy/my-websearch'

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