Skip to main content
Glama

search_code

Search the SKB knowledge base for code examples, snippets, and reference implementations by query, with optional language filters to find relevant patterns from .skb/.

Instructions

Search the knowledge base for code examples and reference implementations.

Filters results to code file types only. Use when looking for code patterns, snippets, or implementation examples from .skb/.

Input:

  • query: what code to search for

  • language: optional filter (e.g., "python", "typescript")

  • n_results: how many results (default 5)

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "search_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYes
languageNo
n_resultsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it does disclose the key behavioral trait that results are filtered to code file types from .skb/. It says nothing about ranking, result shape, or whether the operation is purely read-only, leaving real gaps for a no-annotation tool.

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?

Front-loads the core purpose, then the filter behavior, then the usage trigger, and closes with a compact parameter list. The parameter recap is redundant with the schema but justified given 0% schema coverage, and no sentence is wasted.

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

Completeness3/5

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

Since there is no output schema and no annotations, the description should say more about what a result looks like (file paths, snippets, scores). It is adequate for selecting the tool but leaves the agent guessing about return values.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate, and it does: it explains query, marks language as an optional filter with example values ('python', 'typescript'), and notes n_results defaults to 5. Only the expected format of query strings is left implicit.

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?

States a specific verb (search) plus the resource (knowledge base) and narrows scope to code file types from .skb/, which implicitly separates it from search_docs. It stops short of naming any sibling explicitly, so differentiation relies on the 'code' qualifier alone.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a clear trigger: 'Use when looking for code patterns, snippets, or implementation examples.' It supplies context for when to reach for this tool but no explicit exclusion or named alternative for non-code lookups.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.