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 };
    });
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves data ('Get'), implying a read-only operation, but doesn't specify whether it requires authentication, has rate limits, returns paginated results, or what happens if the knowledge base is empty. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/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 ('Get complete knowledge base') and adds necessary detail ('as formatted JSON'). There's no wasted wording, and it's appropriately sized for a simple retrieval tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (retrieving an entire knowledge base), lack of annotations, no output schema, and low parameter schema coverage, the description is incomplete. It doesn't explain the return structure, error conditions, or how the 'format' parameter affects output. For a tool that could return large datasets, more context is needed to use it effectively.

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?

The input schema has 1 parameter with 0% description coverage and an enum of values. The description doesn't mention the 'format' parameter or explain what 'full', 'summary', or 'categories' mean in context. Since schema coverage is low (<50%), the description should compensate but doesn't, leaving parameter semantics unclear. However, with only one optional parameter, the baseline is slightly higher than minimal.

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 'Get' and the resource 'complete knowledge base', specifying the output format 'as formatted JSON'. It distinguishes from siblings like kb_get_context or kb_get_custom by indicating it retrieves the entire knowledge base, not subsets. However, it doesn't explicitly contrast with all siblings like kb_export or kb_search.

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 provides no guidance on when to use this tool versus alternatives. It doesn't mention when to prefer kb_get_all over kb_get_context for context-specific data, kb_search for filtered results, or kb_export for different output formats. There's no context about prerequisites, such as whether the knowledge base must be initialized first.

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/hlsitechio/mcp-instruct'

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