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

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states a read operation ('Get'), but doesn't describe what 'custom knowledge' includes, how results are returned (e.g., format, pagination), error conditions, or any permissions required. This leaves significant gaps for a tool with potential complexity.

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 with no wasted words. It's appropriately sized for a simple retrieval tool and front-loads the core action and filter.

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 no annotations, no output schema, and a tool that retrieves 'custom knowledge' (which could be complex), the description is incomplete. It doesn't explain what 'custom knowledge' is, how it's structured, or what the return format looks like, leaving the agent with insufficient context for effective use.

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?

Schema description coverage is 100%, with the parameter 'category' documented as optional and returning all if not specified. The description adds no additional meaning beyond this, simply restating 'by category'. Baseline 3 is appropriate since the schema adequately covers the parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get custom knowledge by category' states a verb ('Get') and resource ('custom knowledge'), but is vague about what 'custom knowledge' entails and doesn't distinguish it from sibling tools like kb_get_all, kb_get_context, or kb_get_personal. It lacks specificity about what type of knowledge is retrieved.

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?

No guidance is provided on when to use this tool versus alternatives like kb_get_all (which might retrieve all knowledge without filtering) or kb_get_personal/professional (which might filter by knowledge type). The description implies filtering by category but doesn't specify when this is preferred over other retrieval methods.

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