Resolve Library Id
resolve-library-idResolves a package/product name to a Context7-compatible library ID and returns matching libraries. You MUST call this function before 'query-docs' to obtain a valid Context7-compatible library ID UNLESS the user explicitly provides a library ID in the format '/org/project' or '/org/project/version' in their query. Selection Process: 1. Analyze the query to understand what library/package the user is looking for 2. Return the most relevant match based on: - Name similarity to the query (exact matches prioritized) - Description relevance to the query's intent - Documentation coverage (prioritize libraries with higher Code Snippet counts) - Source reputation (consider libraries with High or Medium reputation more authoritative) - Benchmark Score: Quality indicator (100 is the highest score) Response Format: - Return the selected library ID in a clearly marked section - Provide a brief explanation for why this library was chosen - If multiple good matches exist, acknowledge this but proceed with the most relevant one - If no good matches exist, clearly state this and suggest query refinements For ambiguous queries, request clarification before proceeding with a best-guess match. IMPORTANT: Do not call this tool more than 3 times per question. If you cannot find what you need after 3 calls, use the best result you have.
When to Use
Use this tool when you need to resolves a package/product name to a context7-compatible library id and returns matching libraries.
you must call this function before 'query-docs' to obtain a valid context7-compatible library id unless the user explicitly provides a library id in the format '/org/project' or '/org/project/version' in their query.
selection process:
- analyze the query to understand what library/package the user is looking for
- return the most relevant match based on:
- name similarity to the query (exact matches prioritized)
- description relevance to the query's intent
- documentation coverage (prioritize libraries with higher code snippet counts)
- source reputation (consider libraries with high or medium reputation more authoritative)
- benchmark score: quality indicator (100 is the highest score)
response format:
- return the selected library id in a clearly marked section
- provide a brief explanation for why this library was chosen
- if multiple good matches exist, acknowledge this but proceed with the most relevant one
- if no good matches exist, clearly state this and suggest query refinements
for ambiguous queries, request clarification before proceeding with a best-guess match.
important: do not call this tool more than 3 times per question. if you cannot find what you need after 3 calls, use the best result you have.. This is part of the Context7 provider on xpay✦.
MCP Connection
Connect to xpay✦ to access this tool (and 1+ others):
{
"mcpServers": {
"xpay": {
"url": "https://mcp.xpay.sh/mcp?key=YOUR_API_KEY"
}
}
}
For Claude Code:
claude mcp add --transport http xpay "https://mcp.xpay.sh/mcp?key=YOUR_API_KEY"
How to Execute
Use the xpay✦ meta-tools to run this tool:
xpay_details— Get full input schema:xpay_details("context7/resolve-library-id")xpay_run— Execute:xpay_run("context7/resolve-library-id", { ...inputs })
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
libraryName | string | Yes | Library name to search for and retrieve a Context7-compatible library ID. |
query | string | Yes | The question or task you need help with. This is used to rank library results by relevance to what the user is trying to accomplish. The query is sent to the Context7 API for processing. Do not include any sensitive or confidential information such as API keys, passwords, credentials, personal data, or proprietary code in your query. |
Pricing
- Cost: $0.01/call
- Balance check: Use
xpay_balanceto check remaining credits - Get your API key at xpay.tools — $5 free credits included
Related Skills
- Context7 (all tools) — 2 tools
- Query Docs — $0.01/call
Links
- Tool page: https://xpay.tools/context7/resolve-library-id/
- Provider: https://xpay.tools/context7/
- All tools: https://xpay.tools/explore
How to Execute
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
libraryName | string | Yes | Library name to search for and retrieve a Context7-compatible library ID. |
query | string | Yes | The question or task you need help with. This is used to rank library results by relevance to what the user is trying to accomplish. The query is sent to the Context7 API for processing. Do not include any sensitive or confidential information such as API keys, passwords, credentials, personal data, or proprietary code in your query. |
Related Tools from Context7
Install Skill
Pricing
Cost
$0.01/call
Model
Flat rate
Provider
Context7

