Context7 Query Docs
10 credits/call
ae_context7_query_docs
Retrieve up-to-date documentation and code examples for a specific library. Use the library search/resolve tool first to obtain the correct Context7 library ID.
10 credits/call
Pricing
10 credits/call
| Condition | Charge |
|---|---|
| Each call | 10 credits/call |
Parameters
Optional parameters use the platform defaults when omitted.
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
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. | — |
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'. | — |
Invocation example
Copy the request and explore its response example.
POST
/agent-api/v1/tool/executeX-Api-KeyRequest coderequest.sh
curl --request POST \
--url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_context7_query_docs' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"libraryId": "/reactjs/react.dev",
"query": "Explain React useEffect cleanup timing with an addEventListener/removeEventListener example. Include source links."
}
}'Response exampleresponse.json
"### Cleanup of event listeners in useEffect\n\nSource: https://github.com/reactjs/react.dev/blob/main/src/content/reference/react/useEffect.md\n\nThis example shows how to properly clean up event listeners registered inside useEffect. The setup function adds a"This example shows part of the response. Copied content is valid JSON.





