Skip to main content
Glama

kb_export

Export your knowledge base data as a JSON string for backup, transfer, or integration with other systems.

Instructions

Export knowledge base as JSON string

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Tool handler for 'kb_export' that calls KnowledgeManager.exportKnowledgeBase() and returns the JSON as text content.
    case 'kb_export': { const data = await km.exportKnowledgeBase(); return { content: [ { type: 'text', text: data } ] }; }
  • Core implementation that serializes the entire knowledge base (this.kb) to a formatted JSON string.
    async exportKnowledgeBase(): Promise<string> { return JSON.stringify(this.kb, null, 2); }
  • Tool definition including name, description, and empty input schema. This object is part of the tools array returned by listTools.
    { name: 'kb_export', description: 'Export knowledge base as JSON string', inputSchema: { type: 'object', properties: {} } },
  • src/index.ts:423-425 (registration)
    Registers all tools (including kb_export schema) by setting the ListToolsRequestSchema handler to return the tools array.
    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