Skip to main content
Glama

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) }, ], };

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