---
name: "xpay-context7-query-docs"
description: "Retrieves and queries up-to-date documentation and code examples from Context7 for any programming library or framework.

You must call 'resolve-library-id' first to obtain the exact Context7-compatible library ID required to use this tool, UNLESS the user explicitly provides a library ID in the format '/org/project' or '/org/project/version' in their query.

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 information you have."
version: "1.0.0"
price: "$0.01/call"
provider: "Context7"
---

# Query Docs

Retrieves and queries up-to-date documentation and code examples from Context7 for any programming library or framework.

You must call 'resolve-library-id' first to obtain the exact Context7-compatible library ID required to use this tool, UNLESS the user explicitly provides a library ID in the format '/org/project' or '/org/project/version' in their query.

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 information you have.

**Provider:** Context7
**Price:** $0.01/call
**Pricing model:** Flat rate per call

## When to Use

Use this tool when you need to retrieves and queries up-to-date documentation and code examples from context7 for any programming library or framework.

you must call 'resolve-library-id' first to obtain the exact context7-compatible library id required to use this tool, unless the user explicitly provides a library id in the format '/org/project' or '/org/project/version' in their query.

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 information you have.. This is part of the Context7 provider on xpay✦.

## MCP Connection

Connect to xpay✦ to access this tool (and 1+ others):

```json
{
  "mcpServers": {
    "xpay": {
      "url": "https://mcp.xpay.sh/mcp?key=YOUR_API_KEY"
    }
  }
}
```

For Claude Code:
```bash
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:

1. **`xpay_details`** — Get full input schema: `xpay_details("context7/query-docs")`
2. **`xpay_run`** — Execute: `xpay_run("context7/query-docs", { ...inputs })`

## Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `libraryId` | string | Yes | Exact Context7-compatible library ID (e.g., '/mongodb/docs', '/vercel/next.js', '/supabase/supabase', '/vercel/next.js/v14.3.0-canary.87') retrieved from 'resolve-library-id' or directly from user query in the format '/org/project' or '/org/project/version'. |
| `query` | string | Yes | The question or task you need help with. Be specific and include relevant details. Good: 'How to set up authentication with JWT in Express.js' or 'React useEffect cleanup function examples'. Bad: 'auth' or 'hooks'. 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_balance` to check remaining credits
- Get your API key at [xpay.tools](https://xpay.tools/account/settings/api-keys/) — $5 free credits included

## Related Skills

- [Context7 (all tools)](https://xpay.tools/skills/context7/SKILL.md) — 2 tools
- [Resolve Library Id](https://xpay.tools/skills/context7/resolve-library-id/SKILL.md) — $0.01/call

## Links

- Tool page: https://xpay.tools/context7/query-docs/
- Provider: https://xpay.tools/context7/
- All tools: https://xpay.tools/explore
