Skip to main content
Glama
rad-security

RAD Security

Official
by rad-security

list_knowledge_base_documents

Retrieve and filter documents from your organization's security knowledge base by collection, file type, or processing status.

Instructions

List documents in your organization's knowledge base with optional filtering by collections, file type, or status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of documents to return. Default: 100
offsetNoNumber of documents to skip for pagination. Default: 0
filtersNoFilter documents by collections, file_type (pdf, markdown, plaintext, csv), or status (ready, processing, error) (e.g., 'collections:vuln;security,file_type:pdf,status:ready'). Multiple filters can be combined with commas.

Implementation Reference

  • Core handler function that makes the API request to list knowledge base documents using the RadSecurityClient.
    export async function listDocuments(
      client: RadSecurityClient,
      limit?: number,
      offset?: number,
      filters?: string,
    ): Promise<any> {
      const tenantId = await client.getTenantId();
    
      const params: Record<string, any> = {};
    
      if (limit !== undefined) {
        params.limit = limit;
      }
    
      if (offset !== undefined) {
        params.offset = offset;
      }
    
      if (filters !== undefined) {
        params.filters = filters;
      }
    
      return client.makeRequest(
        `/tenants/${tenantId}/accounts/${client.getAccountId()}/knowledge_base/documents`,
        params,
        {
          method: "GET",
        }
      );
    }
  • Zod schema defining the input parameters for the list_knowledge_base_documents tool.
    export const ListDocumentsSchema = z.object({
      limit: z.number().optional().describe("Maximum number of documents to return. Default: 100"),
      offset: z.number().optional().describe("Number of documents to skip for pagination. Default: 0"),
      filters: z.string().optional().describe("Filter documents by collections, file_type (pdf, markdown, plaintext, csv), or status (ready, processing, error) (e.g., 'collections:vuln;security,file_type:pdf,status:ready'). Multiple filters can be combined with commas."),
    });
  • src/index.ts:563-567 (registration)
    Tool registration in the ListTools response, specifying name, description, and input schema.
      name: "list_knowledge_base_documents",
      description:
        "List documents in your organization's knowledge base with optional filtering by collections, file type, or status",
      inputSchema: zodToJsonSchema(knowledgeBase.ListDocumentsSchema),
    },
  • MCP CallTool dispatch handler that validates input with the schema, invokes the listDocuments function, and returns the JSON response as text content.
    case "list_knowledge_base_documents": {
      const args = knowledgeBase.ListDocumentsSchema.parse(
        request.params.arguments
      );
      const response = await knowledgeBase.listDocuments(
        client,
        args.limit,
        args.offset,
        args.filters
      );
      return {
        content: [
          { type: "text", text: JSON.stringify(response, null, 2) },
        ],
      };
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'List' implies a read operation, it doesn't address pagination behavior (implied by offset/limit parameters but not explained), rate limits, authentication requirements, or what happens when no filters are applied. The description mentions filtering capabilities but doesn't explain the tool's default behavior or limitations.

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 a single, efficient sentence that front-loads the core purpose and mentions key capabilities. There's no wasted language, though it could potentially be structured to separate purpose from filtering details more clearly.

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?

For a listing tool with 100% schema coverage but no annotations or output schema, the description provides adequate basic context about what's being listed and filtering options. However, it lacks important behavioral details about pagination, default ordering, error conditions, and relationship to sibling tools that would make it more complete for agent use.

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 already documents all three parameters thoroughly. The description adds marginal value by mentioning the filtering options (collections, file type, status) but doesn't provide additional semantic context beyond what's in the parameter descriptions. This meets the baseline for high schema coverage.

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 verb 'List' and resource 'documents in your organization's knowledge base', making the purpose immediately understandable. It doesn't explicitly distinguish from sibling tools like 'list_knowledge_base_collections' or 'search_knowledge_base', but the resource focus is specific enough for basic differentiation.

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 mentions optional filtering capabilities but provides no guidance on when to use this tool versus alternatives like 'search_knowledge_base' or 'query_knowledge_base_document'. There's no mention of prerequisites, typical use cases, or when this listing approach is preferable to search functionality.

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