Skip to main content
Glama
rad-security

RAD Security

Official
by rad-security

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",
        }
      );
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It mentions 'List all collections' but doesn't disclose pagination behavior (implied by parameters), rate limits, authentication requirements, or what the return format looks like. For a list operation with zero annotation coverage, this is inadequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately brief with two sentences. The first sentence states the core purpose clearly, while the second adds helpful context about collections. There's no wasted verbiage, though it could be slightly more front-loaded with usage guidance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (list operation with 2 optional parameters) and 100% schema coverage, the description is minimally adequate. However, with no annotations and no output schema, it should ideally explain more about the return format or behavioral constraints to reach completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents both parameters (limit and offset). The description adds no parameter-specific information beyond what's in the schema, resulting in the baseline score of 3 for adequate but no extra value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('List all collections') and resource ('in your organization's knowledge base'), with additional context about what collections are used for. However, it doesn't explicitly differentiate from sibling tools like 'list_knowledge_base_documents' or 'search_knowledge_base', which would require a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'list_knowledge_base_documents' or 'search_knowledge_base', nor does it specify prerequisites or exclusions for usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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