Skip to main content
Glama

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
NameRequiredDescriptionDefault
limitNoMaximum number of collections to return. Default: 100
offsetNoNumber 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), },
  • 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"), });
  • 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", } ); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rad-security/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server