Skip to main content
Glama

kb_get_all

Retrieve the complete knowledge base as formatted JSON to access stored personal and organizational context for AI agents.

Instructions

Get complete knowledge base as formatted JSON

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNofull

Implementation Reference

  • The main handler for the 'kb_get_all' tool. Retrieves the full knowledge base using km.getKnowledgeBase(), formats it according to the 'format' parameter (full, summary, or categories), and returns it as a JSON string in the MCP response format.
    case 'kb_get_all': { const format = (args as any).format || 'full'; const kb = km.getKnowledgeBase(); let result: any; if (format === 'summary') { result = { personal: { name: kb.personal.name, location: kb.personal.currentLocation, languages: kb.personal.languages }, professional: { occupation: kb.professional.occupation, experience: kb.professional.yearsOfExperience, skills: kb.professional.skills }, preferences: { communicationStyle: kb.preferences.communicationStyle, technicalLevel: kb.preferences.technicalLevel }, projects: { current: kb.projects.currentProjects, technologies: kb.projects.technologies }, customCategories: [...new Set(kb.custom.map(c => c.category))] }; } else if (format === 'categories') { result = { categories: { personal: Object.keys(kb.personal).filter(k => (kb.personal as any)[k] !== undefined), professional: Object.keys(kb.professional).filter(k => (kb.professional as any)[k] !== undefined), preferences: Object.keys(kb.preferences).filter(k => (kb.preferences as any)[k] !== undefined), projects: Object.keys(kb.projects).filter(k => (kb.projects as any)[k] !== undefined), custom: [...new Set(kb.custom.map(c => c.category))] } }; } else { result = { personal: kb.personal, professional: kb.professional, preferences: kb.preferences, projects: kb.projects, custom: kb.custom }; } return { content: [ { type: 'text', text: JSON.stringify(result, null, 2) } ] }; }
  • The tool schema definition for 'kb_get_all', including name, description, and inputSchema specifying the optional 'format' parameter.
    { name: 'kb_get_all', description: 'Get complete knowledge base as formatted JSON', inputSchema: { type: 'object', properties: { format: { type: 'string', enum: ['full', 'summary', 'categories'], default: 'full' } } } },
  • src/index.ts:423-425 (registration)
    Registration of all tools (including 'kb_get_all') via the ListToolsRequestHandler, which returns the complete tools array for MCP tool discovery.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { 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/hlsitechio/mcp-instruct'

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