list_knowledge_base_collections
Retrieve and list all collections in your organization's knowledge base to organize and categorize security documents for Kubernetes and cloud environments.
Instructions
List all collections in your organization's knowledge base. Collections are used to organize and categorize documents
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of collections to return. Default: 100 | |
| offset | No | Number of collections to skip for pagination. Default: 0 |
Implementation Reference
- src/index.ts:557-561 (registration)Registration of the 'list_knowledge_base_collections' tool in the ListToolsRequestSchema handler, including name, description, and input schema reference.name: "list_knowledge_base_collections", description: "List all collections in your organization's knowledge base. Collections are used to organize and categorize documents", inputSchema: zodToJsonSchema(knowledgeBase.ListCollectionsSchema), },
- src/index.ts:1488-1502 (handler)Handler for executing the 'list_knowledge_base_collections' tool in the CallToolRequestSchema switch statement. Parses arguments, calls the underlying function, and formats response.case "list_knowledge_base_collections": { const args = knowledgeBase.ListCollectionsSchema.parse( request.params.arguments ); const response = await knowledgeBase.listCollections( client, args.limit, args.offset ); return { content: [ { type: "text", text: JSON.stringify(response, null, 2) }, ], }; }
- Zod schema defining the input parameters for listing knowledge base collections (limit and offset).export const ListCollectionsSchema = z.object({ limit: z.number().optional().describe("Maximum number of collections to return. Default: 100"), offset: z.number().optional().describe("Number of collections to skip for pagination. Default: 0"), });
- src/operations/knowledge-base.ts:72-96 (handler)Core handler function that makes the API request to list knowledge base collections using the RadSecurityClient.export async function listCollections( client: RadSecurityClient, limit?: number, offset?: number, ): Promise<any> { const tenantId = await client.getTenantId(); const params: Record<string, any> = {}; if (limit !== undefined) { params.limit = limit; } if (offset !== undefined) { params.offset = offset; } return client.makeRequest( `/tenants/${tenantId}/accounts/${client.getAccountId()}/knowledge_base/collections`, params, { method: "GET", } ); }