Skip to main content
Glama

kb_get_custom

Retrieve custom knowledge by category from persistent personal and organizational storage, enabling AI agents to access structured data for instant context across sessions.

Instructions

Get custom knowledge by category

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryNoCategory to retrieve (optional, returns all if not specified)

Implementation Reference

  • The handler case for 'kb_get_custom' tool execution. Extracts optional category from arguments, calls KnowledgeManager.getCustom(), and returns the custom knowledge as JSON-formatted text content.
    case 'kb_get_custom': { const category = (args as any).category; const custom = km.getCustom(category); return { content: [ { type: 'text', text: JSON.stringify(custom, null, 2) } ] }; }
  • Tool schema definition and registration in the tools array used for ListToolsRequestSchema. Defines input schema with optional 'category' string parameter.
    { name: 'kb_get_custom', description: 'Get custom knowledge by category', inputSchema: { type: 'object', properties: { category: { type: 'string', description: 'Category to retrieve (optional, returns all if not specified)' } } } },
  • Core helper method 'getCustom' in KnowledgeManager class that filters the kb.custom array by category if provided, otherwise returns all custom knowledge entries.
    getCustom(category?: string): CustomKnowledge[] { if (category) { return this.kb.custom.filter(k => k.category === category); } return [...this.kb.custom]; }

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