Context7 Platform -- Up-to-date docs for AI agents
docs: update API guide and OpenAPI schema and reorder the api docs (#2388)
Enes Gules6cba6fb29b26
diff --git a/docs/api-guide.mdx b/docs/api-guide.mdxindex 61c2ec35..e56b8aec 100644--- a/docs/api-guide.mdx+++ b/docs/api-guide.mdx@@ -16,79 +16,19 @@ Get your API key at [context7.com/dashboard](https://context7.com/dashboard). Le## API Methods-Context7 provides two core API methods for retrieving documentation context.--### Search Library--Search for available libraries by name. Use this to find the correct library ID before fetching documentation.--**Endpoint:** `GET /api/v2/libs/search`--| Parameter | Type | Required | Description |-|-----------|------|----------|-------------|-| `query` | string | Yes | Your question or task (used for relevance ranking) |-| `libraryName` | string | Yes | Library name to search for (e.g., "react", "nextjs") |--**Response:** Returns an array of matching libraries:--```json-[- {- "id": "/facebook/react",- "name": "React",- "description": "A JavaScript library for building user interfaces",- "totalSnippets": 1250,- "trustScore": 95,- "benchmarkScore": 88,- "versions": ["v18.2.0", "v17.0.2"]- }-]-```--**Example:**--```bash-curl "https://context7.com/api/v2/libs/search?libraryName=react&query=hooks" \- -H "Authorization: Bearer CONTEXT7_API_KEY"-```--### Get Context--Retrieve documentation context for a specific library. Returns relevant documentation snippets based on your query.--**Endpoint:** `GET /api/v2/context`--| Parameter | Type | Required | Description |-|-----------|------|----------|-------------|-| `query` | string | Yes | Your question or task (used for relevance ranking) |-| `libraryId` | string | Yes | Library identifier from search (e.g., `/facebook/react`) |-| `type` | string | No | Response format: `json` (default) or `txt` |--**Response (JSON format):** Returns an array of documentation snippets:--```json-[- {- "title": "Using the Effect Hook",- "content": "The Effect Hook lets you perform side effects...",- "source": "react.dev/reference/react/useEffect"- }-]-```--**Response (Text format):** Returns plain text ready for LLM prompts.--**Example:**--```bash-# JSON format (default)-curl "https://context7.com/api/v2/context?libraryId=/facebook/react&query=useEffect" \- -H "Authorization: Bearer CONTEXT7_API_KEY"--# Text format-curl "https://context7.com/api/v2/context?libraryId=/facebook/react&query=useEffect&type=txt" \- -H "Authorization: Bearer CONTEXT7_API_KEY"-```+| Method | Endpoint | Description |+|--------|----------|-------------|+| [Search Library](/api-reference/search/search-for-libraries) | `GET /api/v2/libs/search` | Find libraries by name |+| [Get Context](/api-reference/context/get-documentation-context) | `GET /api/v2/context` | Retrieve documentation snippets for a library |+| [Refresh Library](/api-reference/refresh/refresh-a-library) | `POST /api/v1/refresh` | Refresh a library's documentation |+| [Get Policies](/api-reference/policies/get-teamspace-policies) | `GET /api/v2/policies` | Retrieve teamspace policy configuration |+| [Update Policies](/api-reference/policies/update-teamspace-policies) | `PATCH /api/v2/policies` | Update teamspace policies |+| [Add Library](/api-reference/add-library/add-a-github-repository) | `POST /api/v2/add/repo/{provider}` | Submit a repository for processing |+| [Add OpenAPI](/api-reference/add-library/add-an-openapi-specification-by-url) | `POST /api/v2/add/openapi` | Submit an OpenAPI spec |+| [Upload OpenAPI](/api-reference/add-library/upload-an-openapi-specification-file) | `POST /api/v2/add/openapi-upload` | Upload an OpenAPI spec file |+| [Add LLMs.txt](/api-reference/add-library/add-an-llmstxt-file) | `POST /api/v2/add/llmstxt` | Submit an llms.txt file |+| [Add Website](/api-reference/add-library/add-a-website) | `POST /api/v2/add/website` | Submit a website for crawling |+| [Add Confluence](/api-reference/add-library/add-a-confluence-space) | `POST /api/v2/add/confluence` | Submit a Confluence space |### Complete Workflow Example@@ -103,25 +43,29 @@ search_response = requests.get(headers=headers,params={"libraryName": "react", "query": "I need to manage state"})-libraries = search_response.json()-best_match = libraries[0]-print(f"Found: {best_match['name']} ({best_match['id']})")+data = search_response.json()+best_match = data["results"][0]+print(f"Found: {best_match['title']} ({best_match['id']})")# Step 2: Get documentation contextcontext_response = requests.get("https://context7.com/api/v2/context",headers=headers,- params={"libraryId": best_match["id"], "query": "How do I use useState?"}+ params={"libraryId": best_match["id"], "query": "How do I use useState?", "type": "json"})docs = context_response.json()-for doc in docs:- print(f"Title: {doc['title']}")- print(f"Content: {doc['content'][:200]}...")+for snippet in docs["codeSnippets"]:+ print(f"Title: {snippet['codeTitle']}")+ for code in snippet["codeList"]:+ print(f"Code: {code['code'][:200]}...")++for info in docs["infoSnippets"]:+ print(f"Content: {info['content'][:200]}...")```<Info>- For TypeScript SDK usage with additional features, see [Search Library](/sdks/ts/commands/search-library) and [Get Context](/sdks/ts/commands/get-context).+ For TypeScript SDK usage, see [Search Library](/sdks/ts/commands/search-library) and [Get Context](/sdks/ts/commands/get-context).</Info>## Rate Limits@@ -130,14 +74,14 @@ for doc in docs:- **With API key**: Higher limits based on your plan- View current usage and reset windows in the [dashboard](https://context7.com/dashboard).-When you exceed rate limits, the API returns a `429` status code:+When you exceed rate limits, the API returns a `429` status code with these headers:-```json-{- "error": "Too many requests",- "status": 429-}-```+| Header | Description |+|--------|-------------|+| `Retry-After` | Seconds until rate limit resets |+| `RateLimit-Limit` | Total request limit |+| `RateLimit-Remaining` | Remaining requests in window |+| `RateLimit-Reset` | Unix timestamp when limit resets |## Best Practices@@ -157,7 +101,7 @@ curl "https://context7.com/api/v2/context?libraryId=/vercel/next.js&query=auth"### Cache Responses-Store documentation locally to reduce API calls and improve performance. Documentation updates are relatively infrequent, so caching for several hours or days is usually appropriate.+Documentation updates are relatively infrequent, so caching responses for several hours or days reduces API calls and improves performance.### Handle Rate Limits@@ -172,8 +116,8 @@ def fetch_with_retry(url, headers, max_retries=3):response = requests.get(url, headers=headers)if response.status_code == 429:- # Wait before retrying with exponential backoff- time.sleep(2 ** attempt)+ retry_after = int(response.headers.get("Retry-After", 2 ** attempt))+ time.sleep(retry_after)continuereturn response@@ -183,12 +127,14 @@ def fetch_with_retry(url, headers, max_retries=3):### Use Specific Versions-Specify exact versions for consistent results across deployments:+Pin to a specific version for consistent results. Both `/` and `@` syntax are supported:```bash-# Pin to a specific versioncurl "https://context7.com/api/v2/context?libraryId=/vercel/next.js/v15.1.8&query=app%20router" \-H "Authorization: Bearer CONTEXT7_API_KEY"++curl "https://context7.com/api/v2/context?libraryId=/vercel/[email protected]&query=app%20router" \+ -H "Authorization: Bearer CONTEXT7_API_KEY"```## Error Handling@@ -202,24 +148,26 @@ The Context7 API uses standard HTTP status codes:| 301 | Moved - Library redirected | Use the new library ID from `redirectUrl` || 400 | Bad Request - Invalid parameters | Check query parameters || 401 | Unauthorized - Invalid API key | Check your API key format (starts with `ctx7sk`) |-| 403 | Forbidden - Access denied | Check library access permissions |+| 403 | Forbidden - Access denied | Check library access permissions or plan || 404 | Not Found - Library doesn't exist | Verify the library ID |+| 409 | Conflict - Resource already exists | The library has already been added || 422 | Unprocessable - Library too large/no code | Try a different library || 429 | Too Many Requests - Rate limit exceeded | Wait for `Retry-After` header, then retry || 500 | Internal Server Error | Retry with backoff || 503 | Service Unavailable - Search failed | Retry later |+| 504 | Gateway Timeout - Processing timed out | Retry later |-### Error Response Format--All errors return a JSON object with these fields:+All errors return a JSON object with `error` and `message` fields:```json{"error": "library_not_found",- "message": "Library \"/owner/repo\" not found."+ "message": "Library \"/owner/repo\" not found. Please check the library ID or your access permissions."}```+For `301` redirects, the response also includes a `redirectUrl` field pointing to the new library ID.+## SDK and LibrariesFor TypeScript SDK installation and usage, see the [Getting Started guide](/sdks/ts/getting-started).diff --git a/docs/openapi.json b/docs/openapi.jsonindex 4274bfc6..aaa599d9 100644--- a/docs/openapi.json+++ b/docs/openapi.json@@ -22,7 +22,9 @@"summary": "Search for libraries","description": "Search for libraries by name with intelligent LLM-powered ranking based on your query context.","operationId": "searchLibraries",- "tags": ["Search"],+ "tags": [+ "Search"+ ],"parameters": [{"$ref": "#/components/parameters/LibraryNameParam"@@ -53,7 +55,10 @@"stars": 220000,"trustScore": 10,"benchmarkScore": 95.5,- "versions": ["v18.2.0", "v17.0.2"]+ "versions": [+ "v18.2.0",+ "v17.0.2"+ ]}],"searchFilterApplied": false@@ -67,12 +72,12 @@"401": {"$ref": "#/components/responses/UnauthorizedError"},- "429": {- "$ref": "#/components/responses/RateLimitError"- },"404": {"$ref": "#/components/responses/NotFoundError"},+ "429": {+ "$ref": "#/components/responses/RateLimitError"+ },"500": {"$ref": "#/components/responses/InternalServerError"},@@ -93,7 +98,9 @@"summary": "Get documentation context","description": "Retrieve intelligent, LLM-reranked documentation context for natural language queries. Returns the most relevant code snippets and documentation for your specific question.","operationId": "getContext",- "tags": ["Context"],+ "tags": [+ "Context"+ ],"parameters": [{"$ref": "#/components/parameters/LibraryIdParam"@@ -148,65 +155,12 @@}}},- "400": {- "$ref": "#/components/responses/BadRequestError"- },- "403": {- "$ref": "#/components/responses/ForbiddenError"- },- "404": {- "$ref": "#/components/responses/NotFoundError"- },"202": {"$ref": "#/components/responses/AcceptedError"},"301": {"$ref": "#/components/responses/RedirectError"},- "422": {- "$ref": "#/components/responses/UnprocessableEntityError"- },- "401": {- "$ref": "#/components/responses/UnauthorizedError"- },- "429": {- "$ref": "#/components/responses/RateLimitError"- },- "500": {- "$ref": "#/components/responses/InternalServerError"- }- },- "security": [- {},- {- "bearerAuth": []- }- ]- }- },- "/v2/add/repo/github": {- "post": {- "summary": "Add a GitHub repository",- "description": "Submit a GitHub repository for documentation processing. Supports private repos via a gitToken or by connecting your GitHub account at https://context7.com/add-library.",- "operationId": "addGitHubRepo",- "tags": ["Add Library"],- "requestBody": {- "required": true,- "content": {- "application/json": {- "schema": {- "$ref": "#/components/schemas/AddRepoRequest"- },- "example": {- "docsRepoUrl": "https://github.com/vercel/next.js"- }- }- }- },- "responses": {- "200": {- "$ref": "#/components/responses/AddLibrarySuccess"- },"400": {"$ref": "#/components/responses/BadRequestError"},@@ -219,48 +173,83 @@"404": {"$ref": "#/components/responses/NotFoundError"},- "409": {- "$ref": "#/components/responses/DuplicateError"+ "422": {+ "$ref": "#/components/responses/UnprocessableEntityError"},"429": {"$ref": "#/components/responses/RateLimitError"},"500": {"$ref": "#/components/responses/InternalServerError"- },- "504": {- "$ref": "#/components/responses/GatewayTimeoutError"}},"security": [+ {},{"bearerAuth": []}]}},- "/v2/add/repo/gitlab": {+ "/v1/refresh": {"post": {- "summary": "Add a GitLab repository",- "description": "Submit a GitLab repository for documentation processing. Supports private repos via a gitToken or by connecting your GitLab account at https://context7.com/add-library.",- "operationId": "addGitLabRepo",- "tags": ["Add Library"],+ "summary": "Refresh a library",+ "description": "Trigger a refresh of an existing library to fetch the latest documentation. Library owners have dedicated refresh limits.",+ "operationId": "refreshLibrary",+ "tags": [+ "Refresh"+ ],"requestBody": {"required": true,"content": {"application/json": {"schema": {- "$ref": "#/components/schemas/AddRepoRequest"+ "type": "object",+ "required": [+ "libraryName"+ ],+ "properties": {+ "libraryName": {+ "type": "string",+ "description": "Library identifier in `/owner/repo` format"+ },+ "branch": {+ "type": "string",+ "description": "Optional branch name to refresh"+ },+ "gitToken": {+ "type": "string",+ "description": "Optional Git access token for refreshing private repositories. If not provided, the stored OAuth token will be used."+ }+ }},"example": {- "docsRepoUrl": "https://gitlab.com/owner/repo"+ "libraryName": "/vercel/next.js"}}}},"responses": {"200": {- "$ref": "#/components/responses/AddLibrarySuccess"+ "description": "Refresh started successfully",+ "content": {+ "application/json": {+ "schema": {+ "type": "object",+ "properties": {+ "message": {+ "type": "string"+ }+ },+ "required": [+ "message"+ ]+ },+ "example": {+ "message": "Refresh started successfully"+ }+ }+ }},"400": {"$ref": "#/components/responses/BadRequestError"@@ -274,17 +263,11 @@"404": {"$ref": "#/components/responses/NotFoundError"},- "409": {- "$ref": "#/components/responses/DuplicateError"- },"429": {"$ref": "#/components/responses/RateLimitError"},"500": {"$ref": "#/components/responses/InternalServerError"- },- "504": {- "$ref": "#/components/responses/GatewayTimeoutError"}},"security": [@@ -294,28 +277,68 @@]}},- "/v2/add/repo/bitbucket": {- "post": {- "summary": "Add a Bitbucket repository",- "description": "Submit a Bitbucket repository for documentation processing. Supports private repos via a gitToken or by connecting your Bitbucket account at https://context7.com/add-library.",- "operationId": "addBitbucketRepo",- "tags": ["Add Library"],- "requestBody": {- "required": true,- "content": {- "application/json": {- "schema": {- "$ref": "#/components/schemas/AddRepoRequest"- },- "example": {- "docsRepoUrl": "https://bitbucket.org/owner/repo"- }- }- }- },+ "/v2/policies": {+ "get": {+ "summary": "Get teamspace policies",+ "description": "Retrieve the current policy configuration for the teamspace associated with the API key. Includes source type access settings and public repository filters.",+ "operationId": "getPolicies",+ "tags": [+ "Policies"+ ],"responses": {"200": {- "$ref": "#/components/responses/AddLibrarySuccess"+ "description": "Current policy configuration",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/PolicyResponse"+ },+ "example": {+ "sourceTypes": {+ "public_repos": {+ "enabled": true+ },+ "private_sources": {+ "enabled": true+ },+ "confluence": {+ "enabled": false+ },+ "uploaded_files": {+ "enabled": true+ },+ "websites": {+ "enabled": true+ },+ "llmstxt": {+ "enabled": true+ }+ },+ "libraryFilters": {+ "mode": "quality",+ "quality": {+ "requireVerified": false,+ "minTrustScore": null,+ "maxAgeDays": 365,+ "blockedLibraries": [+ "/org/repo",+ "example.com"+ ],+ "exceptedLibraries": [+ "/vercel/next.js"+ ],+ "repoFilters": {+ "minStars": 100+ }+ },+ "select": {+ "allowedLibraries": []+ }+ },+ "accessibleLibraryCount": 4521+ }+ }+ }},"400": {"$ref": "#/components/responses/BadRequestError"@@ -329,17 +352,8 @@"404": {"$ref": "#/components/responses/NotFoundError"},- "409": {- "$ref": "#/components/responses/DuplicateError"- },- "429": {- "$ref": "#/components/responses/RateLimitError"- },"500": {"$ref": "#/components/responses/InternalServerError"- },- "504": {- "$ref": "#/components/responses/GatewayTimeoutError"}},"security": [@@ -347,82 +361,192 @@"bearerAuth": []}]- }- },- "/v2/add/repo/git": {- "post": {- "summary": "Add from other Git providers",- "description": "Submit a repository from any Git provider not covered by the dedicated GitHub, GitLab, or Bitbucket endpoints. Supports Gitea, Forgejo, Codeberg, self-hosted GitLab, and other Git servers. For private repos, provide a personal access token via the gitToken field.",- "operationId": "addGitRepo",- "tags": ["Add Library"],+ },+ "patch": {+ "summary": "Update teamspace policies",+ "description": "Incrementally update policy configuration for the teamspace associated with the API key. Only the fields you include in the request body are modified — omitted fields remain unchanged. For source types, use `enable`/`disable` arrays (both allowed if no overlap). For library lists, use `add`/`remove` objects or `clear: true` to remove all. Requires owner or admin role. All field names use camelCase.",+ "operationId": "updatePolicies",+ "tags": [+ "Policies"+ ],"requestBody": {"required": true,"content": {"application/json": {"schema": {- "type": "object",- "required": ["docsRepoUrl"],- "properties": {- "docsRepoUrl": {- "type": "string",- "format": "uri",- "description": "The Git repository URL"- },- "gitToken": {- "type": "string",- "description": "Personal access token for private repositories"- },- "private": {- "type": "boolean",- "description": "Whether the repository is private"- },- "skipBenchmark": {- "type": "boolean",- "description": "Skip benchmark quality scoring after parsing"- },- "skipContextGeneration": {- "type": "boolean",- "description": "Skip automatic default context generation"- },- "skipVersionFiltering": {- "type": "boolean",- "description": "Skip filtering out version-specific documentation pages"- }- }+ "$ref": "#/components/schemas/PatchPoliciesRequest"},- "example": {- "docsRepoUrl": "https://codeberg.org/owner/repo"- }- }- }- },- "responses": {- "200": {- "$ref": "#/components/responses/AddLibrarySuccess"- },- "400": {- "$ref": "#/components/responses/BadRequestError"- },- "401": {- "$ref": "#/components/responses/UnauthorizedError"- },- "403": {- "$ref": "#/components/responses/ForbiddenError"- },- "404": {- "$ref": "#/components/responses/NotFoundError"- },- "409": {- "$ref": "#/components/responses/DuplicateError"+ "examples": {+ "disableSourceType": {+ "summary": "Disable a source type",+ "value": {+ "sourceTypes": {+ "disable": [+ "websites"+ ]+ }+ }+ },+ "setQualityFilters": {+ "summary": "Set quality filter thresholds",+ "value": {+ "libraryFilters": {+ "quality": {+ "requireVerified": true,+ "minTrustScore": 4,+ "repoFilters": {+ "minStars": 1000+ }+ }+ }+ }+ },+ "setWebsiteFilters": {+ "summary": "Set website quality filters",+ "value": {+ "libraryFilters": {+ "quality": {+ "websiteFilters": {+ "minBacklinks": 100,+ "minReferringDomains": 10,+ "minOrganicTraffic": 1000+ }+ }+ }+ }+ },+ "blockLibrary": {+ "summary": "Add a library to the blocked list",+ "value": {+ "libraryFilters": {+ "quality": {+ "blockedLibraries": {+ "add": [+ "/org/repo"+ ]+ }+ }+ }+ }+ },+ "blockDomain": {+ "summary": "Block all libraries from a domain",+ "value": {+ "libraryFilters": {+ "quality": {+ "blockedLibraries": {+ "add": [+ "example.com"+ ]+ }+ }+ }+ }+ },+ "exceptLibrary": {+ "summary": "Add a library exception (bypasses all filters)",+ "value": {+ "libraryFilters": {+ "quality": {+ "exceptedLibraries": {+ "add": [+ "/vercel/next.js"+ ]+ }+ }+ }+ }+ },+ "allowDomain": {+ "summary": "Allow libraries from a specific domain (select mode)",+ "value": {+ "libraryFilters": {+ "select": {+ "allowedLibraries": {+ "add": [+ "stripe.com",+ "/vercel/next.js"+ ]+ }+ }+ }+ }+ },+ "clearAllowedLibraries": {+ "summary": "Clear all allowed libraries",+ "value": {+ "libraryFilters": {+ "select": {+ "allowedLibraries": {+ "clear": true+ }+ }+ }+ }+ },+ "combined": {+ "summary": "Multiple changes in one request",+ "value": {+ "sourceTypes": {+ "enable": [+ "websites"+ ],+ "disable": [+ "confluence"+ ]+ },+ "libraryFilters": {+ "mode": "quality",+ "quality": {+ "minTrustScore": 4,+ "maxAgeDays": 365,+ "blockedLibraries": {+ "add": [+ "/org/repo"+ ],+ "remove": [+ "/org/old-repo"+ ]+ },+ "repoFilters": {+ "minStars": 100+ },+ "websiteFilters": {+ "minBacklinks": 100+ }+ }+ }+ }+ }+ }+ }+ }+ },+ "responses": {+ "200": {+ "description": "Updated policy configuration",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/PolicyResponse"+ }+ }+ }},- "429": {- "$ref": "#/components/responses/RateLimitError"+ "400": {+ "$ref": "#/components/responses/BadRequestError"+ },+ "401": {+ "$ref": "#/components/responses/UnauthorizedError"+ },+ "403": {+ "$ref": "#/components/responses/ForbiddenError"+ },+ "404": {+ "$ref": "#/components/responses/NotFoundError"},"500": {"$ref": "#/components/responses/InternalServerError"- },- "504": {- "$ref": "#/components/responses/GatewayTimeoutError"}},"security": [@@ -432,11 +556,11 @@]}},- "/v2/add/openapi": {+ "/v2/add/repo/github": {"post": {- "summary": "Add an OpenAPI specification by URL",- "description": "Submit an OpenAPI specification URL for documentation processing.",- "operationId": "addOpenApi",+ "summary": "Add a GitHub repository",+ "description": "Submit a GitHub repository for documentation processing. Supports private repos via a gitToken or by connecting your GitHub account at https://context7.com/add-library.",+ "operationId": "addGitHubRepo","tags": ["Add Library"],@@ -445,20 +569,10 @@"content": {"application/json": {"schema": {- "type": "object",- "required": [- "openApiUrl"- ],- "properties": {- "openApiUrl": {- "type": "string",- "format": "uri",- "description": "URL pointing to an OpenAPI specification (JSON or YAML)"- }- }+ "$ref": "#/components/schemas/AddRepoRequest"},"example": {- "openApiUrl": "https://api.example.com/openapi.json"+ "docsRepoUrl": "https://github.com/vercel/next.js"}}}@@ -473,6 +587,15 @@"401": {"$ref": "#/components/responses/UnauthorizedError"},+ "403": {+ "$ref": "#/components/responses/ForbiddenError"+ },+ "404": {+ "$ref": "#/components/responses/NotFoundError"+ },+ "409": {+ "$ref": "#/components/responses/DuplicateError"+ },"429": {"$ref": "#/components/responses/RateLimitError"},@@ -490,11 +613,11 @@]}},- "/v2/add/llmstxt": {+ "/v2/add/repo/gitlab": {"post": {- "summary": "Add an llms.txt file",- "description": "Submit an llms.txt file URL for documentation processing.",- "operationId": "addLlmsTxt",+ "summary": "Add a GitLab repository",+ "description": "Submit a GitLab repository for documentation processing. Supports private repos via a gitToken or by connecting your GitLab account at https://context7.com/add-library.",+ "operationId": "addGitLabRepo","tags": ["Add Library"],@@ -503,20 +626,10 @@"content": {"application/json": {"schema": {- "type": "object",- "required": [- "llmstxtUrl"- ],- "properties": {- "llmstxtUrl": {- "type": "string",- "format": "uri",- "description": "URL pointing to an llms.txt, llms-full.txt, or llms-small.txt file"- }- }+ "$ref": "#/components/schemas/AddRepoRequest"},"example": {- "llmstxtUrl": "https://docs.example.com/llms.txt"+ "docsRepoUrl": "https://gitlab.com/owner/repo"}}}@@ -531,6 +644,15 @@"401": {"$ref": "#/components/responses/UnauthorizedError"},+ "403": {+ "$ref": "#/components/responses/ForbiddenError"+ },+ "404": {+ "$ref": "#/components/responses/NotFoundError"+ },+ "409": {+ "$ref": "#/components/responses/DuplicateError"+ },"429": {"$ref": "#/components/responses/RateLimitError"},@@ -548,11 +670,11 @@]}},- "/v2/add/website": {+ "/v2/add/repo/bitbucket": {"post": {- "summary": "Add a website",- "description": "Submit a website URL for documentation processing.",- "operationId": "addWebsite",+ "summary": "Add a Bitbucket repository",+ "description": "Submit a Bitbucket repository for documentation processing. Supports private repos via a gitToken or by connecting your Bitbucket account at https://context7.com/add-library.",+ "operationId": "addBitbucketRepo","tags": ["Add Library"],@@ -561,25 +683,10 @@"content": {"application/json": {"schema": {- "type": "object",- "required": [- "websiteUrl"- ],- "properties": {- "websiteUrl": {- "type": "string",- "format": "uri",- "description": "The website URL to process"- },- "websiteBaseUrl": {- "type": "string",- "format": "uri",- "description": "Base URL to limit crawling scope. Only pages starting with this URL will be indexed."- }- }+ "$ref": "#/components/schemas/AddRepoRequest"},"example": {- "websiteUrl": "https://docs.example.com"+ "docsRepoUrl": "https://bitbucket.org/owner/repo"}}}@@ -594,8 +701,14 @@"401": {"$ref": "#/components/responses/UnauthorizedError"},- "422": {- "$ref": "#/components/responses/UnprocessableEntityError"+ "403": {+ "$ref": "#/components/responses/ForbiddenError"+ },+ "404": {+ "$ref": "#/components/responses/NotFoundError"+ },+ "409": {+ "$ref": "#/components/responses/DuplicateError"},"429": {"$ref": "#/components/responses/RateLimitError"@@ -614,44 +727,53 @@]}},- "/v2/add/openapi-upload": {+ "/v2/add/repo/git": {"post": {- "summary": "Upload an OpenAPI specification file",- "description": "Upload an OpenAPI specification file (JSON or YAML) for documentation processing. Requires a team project. File size limit is 10MB.",- "operationId": "addOpenApiUpload",- "tags": ["Add Library"],+ "summary": "Add from other Git providers",+ "description": "Submit a repository from any Git provider not covered by the dedicated GitHub, GitLab, or Bitbucket endpoints. Supports Gitea, Forgejo, Codeberg, self-hosted GitLab, and other Git servers. For private repos, provide a personal access token via the gitToken field.",+ "operationId": "addGitRepo",+ "tags": [+ "Add Library"+ ],"requestBody": {"required": true,"content": {- "multipart/form-data": {+ "application/json": {"schema": {"type": "object",- "required": ["openapiFile"],+ "required": [+ "docsRepoUrl"+ ],"properties": {- "openapiFile": {+ "docsRepoUrl": {"type": "string",- "format": "binary",- "description": "The OpenAPI specification file (.json, .yaml, or .yml)"+ "format": "uri",+ "description": "The Git repository URL"},- "libraryTitle": {+ "gitToken": {"type": "string",- "description": "Custom title for the library"+ "description": "Personal access token for private repositories"},- "description": {- "type": "string",- "description": "Description of the library"+ "private": {+ "type": "boolean",+ "description": "Whether the repository is private"},"skipBenchmark": {- "type": "string",- "enum": ["true"],- "description": "Set to 'true' to skip benchmark quality scoring"+ "type": "boolean",+ "description": "Skip benchmark quality scoring after parsing"},- "force": {- "type": "string",- "enum": ["true"],- "description": "Set to 'true' to force reprocessing"+ "skipContextGeneration": {+ "type": "boolean",+ "description": "Skip automatic default context generation"+ },+ "skipVersionFiltering": {+ "type": "boolean",+ "description": "Skip filtering out version-specific documentation pages"}}+ },+ "example": {+ "docsRepoUrl": "https://codeberg.org/owner/repo"}}}@@ -692,65 +814,33 @@]}},- "/v2/add/confluence": {+ "/v2/add/openapi": {"post": {- "summary": "Add a Confluence space",- "description": "Submit a Confluence space for documentation processing. Requires a connected Confluence account and a team project. You can optionally specify specific page IDs to index only a subset of the space.",- "operationId": "addConfluence",- "tags": ["Add Library"],+ "summary": "Add an OpenAPI specification by URL",+ "description": "Submit an OpenAPI specification URL for documentation processing.",+ "operationId": "addOpenApi",+ "tags": [+ "Add Library"+ ],"requestBody": {"required": true,"content": {"application/json": {"schema": {"type": "object",- "required": ["cloudId", "siteUrl", "spaceKey", "spaceName", "title", "description"],+ "required": [+ "openApiUrl"+ ],"properties": {- "cloudId": {- "type": "string",- "description": "The Confluence cloud instance ID"- },- "siteUrl": {- "type": "string",- "description": "The Confluence site URL"- },- "spaceKey": {- "type": "string",- "description": "The Confluence space key"- },- "spaceName": {- "type": "string",- "description": "The Confluence space name"- },- "pageIds": {- "type": "array",- "items": {- "type": "string"- },- "description": "Optional list of specific page IDs to index. If omitted, the entire space is indexed."- },- "title": {- "type": "string",- "description": "Title for the library"- },- "description": {- "type": "string",- "description": "Description of the library"- },- "projectId": {+ "openApiUrl": {"type": "string",- "description": "The team project ID to associate this Confluence space with"+ "format": "uri",+ "description": "URL pointing to an OpenAPI specification (JSON or YAML)"}}},"example": {- "cloudId": "a]1b2c3d4-5e6f-7g8h-9i0j",- "siteUrl": "https://your-site.atlassian.net",- "spaceKey": "DOCS",- "spaceName": "Documentation",- "title": "My Docs",- "description": "Internal documentation",- "projectId": "project-uuid"+ "openApiUrl": "https://api.example.com/openapi.json"}}}@@ -765,12 +855,6 @@"401": {"$ref": "#/components/responses/UnauthorizedError"},- "403": {- "$ref": "#/components/responses/ForbiddenError"- },- "409": {- "$ref": "#/components/responses/DuplicateError"- },"429": {"$ref": "#/components/responses/RateLimitError"},@@ -788,46 +872,59 @@]}},- "/v2/policies": {- "get": {- "summary": "Get teamspace policies",- "description": "Retrieve the current policy configuration for the teamspace associated with the API key. Includes source type access settings and public repository filters.",- "operationId": "getPolicies",- "tags": ["Policies"],- "responses": {- "200": {- "description": "Current policy configuration",- "content": {- "application/json": {- "schema": {- "$ref": "#/components/schemas/PolicyResponse"- },- "example": {- "sourceTypes": {- "public_repos": { "enabled": true },- "private_sources": { "enabled": true },- "confluence": { "enabled": false },- "uploaded_files": { "enabled": true },- "websites": { "enabled": true },- "llmstxt": { "enabled": true }+ "/v2/add/openapi-upload": {+ "post": {+ "summary": "Upload an OpenAPI specification file",+ "description": "Upload an OpenAPI specification file (JSON or YAML) for documentation processing. Requires a team project. File size limit is 10MB.",+ "operationId": "addOpenApiUpload",+ "tags": [+ "Add Library"+ ],+ "requestBody": {+ "required": true,+ "content": {+ "multipart/form-data": {+ "schema": {+ "type": "object",+ "required": [+ "openapiFile"+ ],+ "properties": {+ "openapiFile": {+ "type": "string",+ "format": "binary",+ "description": "The OpenAPI specification file (.json, .yaml, or .yml)"},- "libraryFilters": {- "mode": "quality",- "quality": {- "requireVerified": false,- "minTrustScore": null,- "maxAgeDays": 365,- "blockedLibraries": ["/org/repo"],- "repoFilters": { "minStars": 100 }- },- "select": {- "allowedLibraries": []- }+ "libraryTitle": {+ "type": "string",+ "description": "Custom title for the library"},- "accessibleLibraryCount": 4521+ "description": {+ "type": "string",+ "description": "Description of the library"+ },+ "skipBenchmark": {+ "type": "string",+ "enum": [+ "true"+ ],+ "description": "Set to 'true' to skip benchmark quality scoring"+ },+ "force": {+ "type": "string",+ "enum": [+ "true"+ ],+ "description": "Set to 'true' to force reprocessing"+ }}}}+ }+ },+ "responses": {+ "200": {+ "$ref": "#/components/responses/AddLibrarySuccess"},"400": {"$ref": "#/components/responses/BadRequestError"@@ -841,8 +938,17 @@"404": {"$ref": "#/components/responses/NotFoundError"},+ "409": {+ "$ref": "#/components/responses/DuplicateError"+ },+ "429": {+ "$ref": "#/components/responses/RateLimitError"+ },"500": {"$ref": "#/components/responses/InternalServerError"+ },+ "504": {+ "$ref": "#/components/responses/GatewayTimeoutError"}},"security": [@@ -850,110 +956,105 @@"bearerAuth": []}]- },- "patch": {- "summary": "Update teamspace policies",- "description": "Incrementally update policy configuration for the teamspace associated with the API key. Only the fields you include in the request body are modified — omitted fields remain unchanged. For source types, use `enable`/`disable` arrays (both allowed if no overlap). For library lists, use `add`/`remove` objects or `clear: true` to remove all. Requires owner or admin role. All field names use camelCase.",- "operationId": "updatePolicies",- "tags": ["Policies"],- "requestBody": {- "required": true,- "content": {- "application/json": {- "schema": {- "$ref": "#/components/schemas/PatchPoliciesRequest"- },- "examples": {- "disableSourceType": {- "summary": "Disable a source type",- "value": {- "sourceTypes": {- "disable": ["websites"]- }- }- },- "setQualityFilters": {- "summary": "Set quality filter thresholds",- "value": {- "libraryFilters": {- "quality": {- "requireVerified": true,- "minTrustScore": 4,- "repoFilters": { "minStars": 1000 }- }- }- }- },- "setWebsiteFilters": {- "summary": "Set website quality filters",- "value": {- "libraryFilters": {- "quality": {- "websiteFilters": {- "minBacklinks": 100,- "minReferringDomains": 10,- "minOrganicTraffic": 1000- }- }- }- }- },- "blockLibrary": {- "summary": "Add a library to the blocked list",- "value": {- "libraryFilters": {- "quality": {- "blockedLibraries": { "add": ["/org/repo"] }- }- }- }- },- "clearAllowedLibraries": {- "summary": "Clear all allowed libraries",- "value": {- "libraryFilters": {- "select": {- "allowedLibraries": { "clear": true }- }- }- }- },- "combined": {- "summary": "Multiple changes in one request",- "value": {- "sourceTypes": {- "enable": ["websites"],- "disable": ["confluence"]- },- "libraryFilters": {- "mode": "quality",- "quality": {- "minTrustScore": 4,- "maxAgeDays": 365,- "blockedLibraries": {- "add": ["/org/repo"],- "remove": ["/org/old-repo"]- },- "repoFilters": { "minStars": 100 },- "websiteFilters": { "minBacklinks": 100 }- }- }+ }+ },+ "/v2/add/llmstxt": {+ "post": {+ "summary": "Add an llms.txt file",+ "description": "Submit an llms.txt file URL for documentation processing.",+ "operationId": "addLlmsTxt",+ "tags": [+ "Add Library"+ ],+ "requestBody": {+ "required": true,+ "content": {+ "application/json": {+ "schema": {+ "type": "object",+ "required": [+ "llmstxtUrl"+ ],+ "properties": {+ "llmstxtUrl": {+ "type": "string",+ "format": "uri",+ "description": "URL pointing to an llms.txt, llms-full.txt, or llms-small.txt file"}}+ },+ "example": {+ "llmstxtUrl": "https://docs.example.com/llms.txt"}}}},"responses": {"200": {- "description": "Updated policy configuration",- "content": {- "application/json": {- "schema": {- "$ref": "#/components/schemas/PolicyResponse"+ "$ref": "#/components/responses/AddLibrarySuccess"+ },+ "400": {+ "$ref": "#/components/responses/BadRequestError"+ },+ "401": {+ "$ref": "#/components/responses/UnauthorizedError"+ },+ "429": {+ "$ref": "#/components/responses/RateLimitError"+ },+ "500": {+ "$ref": "#/components/responses/InternalServerError"+ },+ "504": {+ "$ref": "#/components/responses/GatewayTimeoutError"+ }+ },+ "security": [+ {+ "bearerAuth": []+ }+ ]+ }+ },+ "/v2/add/website": {+ "post": {+ "summary": "Add a website",+ "description": "Submit a website URL for documentation processing.",+ "operationId": "addWebsite",+ "tags": [+ "Add Library"+ ],+ "requestBody": {+ "required": true,+ "content": {+ "application/json": {+ "schema": {+ "type": "object",+ "required": [+ "websiteUrl"+ ],+ "properties": {+ "websiteUrl": {+ "type": "string",+ "format": "uri",+ "description": "The website URL to process"+ },+ "websiteBaseUrl": {+ "type": "string",+ "format": "uri",+ "description": "Base URL to limit crawling scope. Only pages starting with this URL will be indexed."+ }}+ },+ "example": {+ "websiteUrl": "https://docs.example.com"}}+ }+ },+ "responses": {+ "200": {+ "$ref": "#/components/responses/AddLibrarySuccess"},"400": {"$ref": "#/components/responses/BadRequestError"@@ -961,14 +1062,17 @@"401": {"$ref": "#/components/responses/UnauthorizedError"},- "403": {- "$ref": "#/components/responses/ForbiddenError"+ "422": {+ "$ref": "#/components/responses/UnprocessableEntityError"},- "404": {- "$ref": "#/components/responses/NotFoundError"+ "429": {+ "$ref": "#/components/responses/RateLimitError"},"500": {"$ref": "#/components/responses/InternalServerError"+ },+ "504": {+ "$ref": "#/components/responses/GatewayTimeoutError"}},"security": [@@ -978,59 +1082,81 @@]}},- "/v1/refresh": {+ "/v2/add/confluence": {"post": {- "summary": "Refresh a library",- "description": "Trigger a refresh of an existing library to fetch the latest documentation. Library owners have dedicated refresh limits.",- "operationId": "refreshLibrary",- "tags": ["Refresh"],+ "summary": "Add a Confluence space",+ "description": "Submit a Confluence space for documentation processing. Requires a connected Confluence account and a team project. You can optionally specify specific page IDs to index only a subset of the space.",+ "operationId": "addConfluence",+ "tags": [+ "Add Library"+ ],"requestBody": {"required": true,"content": {"application/json": {"schema": {"type": "object",- "required": ["libraryName"],+ "required": [+ "cloudId",+ "siteUrl",+ "spaceKey",+ "spaceName",+ "title",+ "description"+ ],"properties": {- "libraryName": {+ "cloudId": {"type": "string",- "description": "Library identifier in `/owner/repo` format"+ "description": "The Confluence cloud instance ID"},- "branch": {+ "siteUrl": {"type": "string",- "description": "Optional branch name to refresh"+ "description": "The Confluence site URL"},- "gitToken": {+ "spaceKey": {"type": "string",- "description": "Optional Git access token for refreshing private repositories. If not provided, the stored OAuth token will be used."+ "description": "The Confluence space key"+ },+ "spaceName": {+ "type": "string",+ "description": "The Confluence space name"+ },+ "pageIds": {+ "type": "array",+ "items": {+ "type": "string"+ },+ "description": "Optional list of specific page IDs to index. If omitted, the entire space is indexed."+ },+ "title": {+ "type": "string",+ "description": "Title for the library"+ },+ "description": {+ "type": "string",+ "description": "Description of the library"+ },+ "projectId": {+ "type": "string",+ "description": "The team project ID to associate this Confluence space with"}}},"example": {- "libraryName": "/vercel/next.js"+ "cloudId": "a]1b2c3d4-5e6f-7g8h-9i0j",+ "siteUrl": "https://your-site.atlassian.net",+ "spaceKey": "DOCS",+ "spaceName": "Documentation",+ "title": "My Docs",+ "description": "Internal documentation",+ "projectId": "project-uuid"}}}},"responses": {"200": {- "description": "Refresh started successfully",- "content": {- "application/json": {- "schema": {- "type": "object",- "properties": {- "message": {- "type": "string"- }- },- "required": ["message"]- },- "example": {- "message": "Refresh started successfully"- }- }- }+ "$ref": "#/components/responses/AddLibrarySuccess"},"400": {"$ref": "#/components/responses/BadRequestError"@@ -1041,14 +1167,17 @@"403": {"$ref": "#/components/responses/ForbiddenError"},- "404": {- "$ref": "#/components/responses/NotFoundError"+ "409": {+ "$ref": "#/components/responses/DuplicateError"},"429": {"$ref": "#/components/responses/RateLimitError"},"500": {"$ref": "#/components/responses/InternalServerError"+ },+ "504": {+ "$ref": "#/components/responses/GatewayTimeoutError"}},"security": [@@ -1125,7 +1254,10 @@"required": false,"schema": {"type": "string",- "enum": ["json", "txt"],+ "enum": [+ "json",+ "txt"+ ],"default": "txt"},"example": "json"@@ -1164,7 +1296,13 @@},"state": {"type": "string",- "enum": ["finalized", "initial", "processing", "error", "delete"],+ "enum": [+ "finalized",+ "initial",+ "processing",+ "error",+ "delete"+ ],"description": "Processing state of the library","example": "finalized"},@@ -1203,7 +1341,10 @@"items": {"type": "string"},- "example": ["v15.1.8", "v14.3.0"]+ "example": [+ "v15.1.8",+ "v14.3.0"+ ]}}},@@ -1223,7 +1364,10 @@"description": "Indicates whether the search results were filtered by the teamspace's public library access settings. When true, some libraries may be excluded from results based on the teamspace's configuration (e.g., only verified libraries, selected libraries, or private repos only)."}},- "required": ["results", "searchFilterApplied"]+ "required": [+ "results",+ "searchFilterApplied"+ ]},"CodeSnippet": {"type": "object",@@ -1284,7 +1428,10 @@"description": "The actual code content"}},- "required": ["language", "code"]+ "required": [+ "language",+ "code"+ ]},"InfoSnippet": {"type": "object",@@ -1307,7 +1454,10 @@"description": "Token count for the content"}},- "required": ["content", "contentTokens"]+ "required": [+ "content",+ "contentTokens"+ ]},"ContextResponse": {"type": "object",@@ -1355,7 +1505,10 @@}}},- "required": ["codeSnippets", "infoSnippets"]+ "required": [+ "codeSnippets",+ "infoSnippets"+ ]},"Error": {"type": "object",@@ -1370,12 +1523,17 @@"description": "Human-readable error message"}},- "required": ["error", "message"]+ "required": [+ "error",+ "message"+ ]},"AddRepoRequest": {"type": "object","description": "Request body for adding a Git repository",- "required": ["docsRepoUrl"],+ "required": [+ "docsRepoUrl"+ ],"properties": {"docsRepoUrl": {"type": "string",@@ -1417,7 +1575,10 @@"description": "Human-readable success message"}},- "required": ["libraryName", "message"]+ "required": [+ "libraryName",+ "message"+ ]},"SourceTypeStatus": {"type": "object",@@ -1428,7 +1589,9 @@"description": "Whether this source type is enabled"}},- "required": ["enabled"]+ "required": [+ "enabled"+ ]},"PolicyResponse": {"type": "object",@@ -1438,14 +1601,33 @@"type": "object","description": "Access settings for each documentation source type","properties": {- "public_repos": { "$ref": "#/components/schemas/SourceTypeStatus" },- "private_sources": { "$ref": "#/components/schemas/SourceTypeStatus" },- "confluence": { "$ref": "#/components/schemas/SourceTypeStatus" },- "uploaded_files": { "$ref": "#/components/schemas/SourceTypeStatus" },- "websites": { "$ref": "#/components/schemas/SourceTypeStatus" },- "llmstxt": { "$ref": "#/components/schemas/SourceTypeStatus" }+ "public_repos": {+ "$ref": "#/components/schemas/SourceTypeStatus"+ },+ "private_sources": {+ "$ref": "#/components/schemas/SourceTypeStatus"+ },+ "confluence": {+ "$ref": "#/components/schemas/SourceTypeStatus"+ },+ "uploaded_files": {+ "$ref": "#/components/schemas/SourceTypeStatus"+ },+ "websites": {+ "$ref": "#/components/schemas/SourceTypeStatus"+ },+ "llmstxt": {+ "$ref": "#/components/schemas/SourceTypeStatus"+ }},- "required": ["public_repos", "private_sources", "confluence", "uploaded_files", "websites", "llmstxt"]+ "required": [+ "public_repos",+ "private_sources",+ "confluence",+ "uploaded_files",+ "websites",+ "llmstxt"+ ]},"libraryFilters": {"type": "object",@@ -1454,69 +1636,147 @@"mode": {"type": "string","nullable": true,- "enum": ["quality", "select", null],+ "enum": [+ "quality",+ "select",+ null+ ],"description": "Filter mode: 'quality' for threshold-based filtering, 'select' for manual library selection"},"quality": {"type": "object","description": "Quality-mode settings (active when mode is 'quality')","properties": {- "requireVerified": { "type": "boolean", "description": "Restrict to verified libraries only" },- "minTrustScore": { "type": "integer", "nullable": true, "description": "Minimum trust score, 0-10" },- "maxAgeDays": { "type": "integer", "nullable": true, "description": "Maximum days since last update" },- "blockedLibraries": { "type": "array", "items": { "type": "string" }, "description": "Libraries excluded from results" },+ "requireVerified": {+ "type": "boolean",+ "description": "Restrict to verified libraries only"+ },+ "minTrustScore": {+ "type": "integer",+ "nullable": true,+ "description": "Minimum trust score, 0-10"+ },+ "maxAgeDays": {+ "type": "integer",+ "nullable": true,+ "description": "Maximum days since last update"+ },+ "blockedLibraries": {+ "type": "array",+ "items": {+ "type": "string"+ },+ "description": "Libraries excluded from results"+ },+ "exceptedLibraries": {+ "type": "array",+ "items": {+ "type": "string"+ },+ "description": "Libraries that bypass all quality filters, blocked list, and source type restrictions"+ },"repoFilters": {"type": "object","description": "Repo-specific quality filters","properties": {- "minStars": { "type": "integer", "nullable": true, "description": "Minimum GitHub stars required" }+ "minStars": {+ "type": "integer",+ "nullable": true,+ "description": "Minimum GitHub stars required"+ }},- "required": ["minStars"]+ "required": [+ "minStars"+ ]},"websiteFilters": {"type": "object","description": "Website-specific quality filters","properties": {- "minBacklinks": { "type": "integer", "nullable": true, "description": "Minimum number of backlinks required" },- "minReferringDomains": { "type": "integer", "nullable": true, "description": "Minimum number of referring domains required" },- "minOrganicTraffic": { "type": "integer", "nullable": true, "description": "Minimum monthly organic traffic required" }+ "minBacklinks": {+ "type": "integer",+ "nullable": true,+ "description": "Minimum number of backlinks required"+ },+ "minReferringDomains": {+ "type": "integer",+ "nullable": true,+ "description": "Minimum number of referring domains required"+ },+ "minOrganicTraffic": {+ "type": "integer",+ "nullable": true,+ "description": "Minimum monthly organic traffic required"+ }},- "required": ["minBacklinks", "minReferringDomains", "minOrganicTraffic"]+ "required": [+ "minBacklinks",+ "minReferringDomains",+ "minOrganicTraffic"+ ]}},- "required": ["requireVerified", "minTrustScore", "maxAgeDays", "blockedLibraries", "repoFilters", "websiteFilters"]+ "required": [+ "requireVerified",+ "minTrustScore",+ "maxAgeDays",+ "blockedLibraries",+ "exceptedLibraries",+ "repoFilters",+ "websiteFilters"+ ]},"select": {"type": "object","description": "Select-mode settings (active when mode is 'select')","properties": {- "allowedLibraries": { "type": "array", "items": { "type": "string" }, "description": "Libraries explicitly allowed" }+ "allowedLibraries": {+ "type": "array",+ "items": {+ "type": "string"+ },+ "description": "Libraries explicitly allowed"+ }},- "required": ["allowedLibraries"]+ "required": [+ "allowedLibraries"+ ]}},- "required": ["mode", "quality", "select"]+ "required": [+ "mode",+ "quality",+ "select"+ ]},"accessibleLibraryCount": {"type": "integer","description": "Number of public libraries currently accessible under these filters"}},- "required": ["sourceTypes", "libraryFilters", "accessibleLibraryCount"]+ "required": [+ "sourceTypes",+ "libraryFilters",+ "accessibleLibraryCount"+ ]},"ListOperation": {"type": "object",- "description": "Incremental add/remove operation on a list of library identifiers. Use 'clear' to remove all entries at once.",+ "description": "Incremental add/remove operation on a list of library identifiers or domains. Use 'clear' to remove all entries at once.","properties": {"add": {"type": "array",- "items": { "type": "string" },- "description": "Library identifiers to add (must start with '/')"+ "items": {+ "type": "string"+ },+ "description": "Identifiers to add — library paths (e.g. '/org/repo', '/org') or domains (e.g. 'stripe.com')"},"remove": {"type": "array",- "items": { "type": "string" },- "description": "Library identifiers to remove (must start with '/')"+ "items": {+ "type": "string"+ },+ "description": "Identifiers to remove — library paths (e.g. '/org/repo', '/org') or domains (e.g. 'stripe.com')"},"clear": {"type": "boolean",@@ -1537,7 +1797,14 @@"type": "array","items": {"type": "string",- "enum": ["public_repos", "private_sources", "confluence", "uploaded_files", "websites", "llmstxt"]+ "enum": [+ "public_repos",+ "private_sources",+ "confluence",+ "uploaded_files",+ "websites",+ "llmstxt"+ ]},"description": "Source types to enable"},@@ -1545,7 +1812,14 @@"type": "array","items": {"type": "string",- "enum": ["public_repos", "private_sources", "confluence", "uploaded_files", "websites", "llmstxt"]+ "enum": [+ "public_repos",+ "private_sources",+ "confluence",+ "uploaded_files",+ "websites",+ "llmstxt"+ ]},"description": "Source types to disable"}@@ -1558,31 +1832,74 @@"mode": {"type": "string","nullable": true,- "enum": ["quality", "select", null],+ "enum": [+ "quality",+ "select",+ null+ ],"description": "Filter mode (null to clear)"},"quality": {"type": "object","description": "Update quality-mode settings.","properties": {- "requireVerified": { "type": "boolean", "description": "Restrict to verified libraries only" },- "minTrustScore": { "type": "integer", "nullable": true, "minimum": 0, "maximum": 10, "description": "Minimum trust score, 0-10 (null to clear)" },- "maxAgeDays": { "type": "integer", "nullable": true, "minimum": 1, "description": "Maximum age in days (null to clear)" },- "blockedLibraries": { "$ref": "#/components/schemas/ListOperation" },+ "requireVerified": {+ "type": "boolean",+ "description": "Restrict to verified libraries only"+ },+ "minTrustScore": {+ "type": "integer",+ "nullable": true,+ "minimum": 0,+ "maximum": 10,+ "description": "Minimum trust score, 0-10 (null to clear)"+ },+ "maxAgeDays": {+ "type": "integer",+ "nullable": true,+ "minimum": 1,+ "description": "Maximum age in days (null to clear)"+ },+ "blockedLibraries": {+ "$ref": "#/components/schemas/ListOperation"+ },+ "exceptedLibraries": {+ "$ref": "#/components/schemas/ListOperation"+ },"repoFilters": {"type": "object","description": "Update repo-specific quality filters.","properties": {- "minStars": { "type": "integer", "nullable": true, "minimum": 0, "description": "Minimum stars threshold (null to clear)" }+ "minStars": {+ "type": "integer",+ "nullable": true,+ "minimum": 0,+ "description": "Minimum stars threshold (null to clear)"+ }}},"websiteFilters": {"type": "object","description": "Update website-specific quality filters.","properties": {- "minBacklinks": { "type": "integer", "nullable": true, "minimum": 0, "description": "Minimum backlinks threshold (null to clear)" },- "minReferringDomains": { "type": "integer", "nullable": true, "minimum": 0, "description": "Minimum referring domains threshold (null to clear)" },- "minOrganicTraffic": { "type": "integer", "nullable": true, "minimum": 0, "description": "Minimum organic traffic threshold (null to clear)" }+ "minBacklinks": {+ "type": "integer",+ "nullable": true,+ "minimum": 0,+ "description": "Minimum backlinks threshold (null to clear)"+ },+ "minReferringDomains": {+ "type": "integer",+ "nullable": true,+ "minimum": 0,+ "description": "Minimum referring domains threshold (null to clear)"+ },+ "minOrganicTraffic": {+ "type": "integer",+ "nullable": true,+ "minimum": 0,+ "description": "Minimum organic traffic threshold (null to clear)"+ }}}}@@ -1591,7 +1908,9 @@"type": "object","description": "Update select-mode settings.","properties": {- "allowedLibraries": { "$ref": "#/components/schemas/ListOperation" }+ "allowedLibraries": {+ "$ref": "#/components/schemas/ListOperation"+ }}}}@@ -1920,16 +2239,16 @@"description": "Retrieve documentation context for queries"},{- "name": "Add Library",- "description": "Submit new libraries for documentation processing"+ "name": "Refresh",+ "description": "Refresh existing libraries to fetch latest documentation"},{"name": "Policies","description": "Manage teamspace access policies and filters"},{- "name": "Refresh",- "description": "Refresh existing libraries to fetch latest documentation"+ "name": "Add Library",+ "description": "Submit new libraries for documentation processing"}]}