Skip to main content
Glama

knowledge_code

Destructive

Index and query code symbols, definitions, callers, and snippets, with fallback for unresolved references.

Instructions

Code index, symbols, callers, fallback.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNo
kindsNo
queryNo
actionYesrebuild=recreate;search=find snippets;symbol=definition;references=find callers;read=URI;record_fallback=raw lookup.
symbolNo
max_charsNo
symbol_idNo
request_idNo
max_resultsNo
resource_uriNo
path_prefixesNo
fallback_reasonNono_match|ambiguous|unresolved_import|unsupported_extension;else other
recovered_evidenceNo
fallback_result_countNo
fallback_result_pathsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
stateYes
guidanceNo
nextActionYes
resultTextNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.9.1
    • changedInput schema / properties / action / description
      Previous value: -"rebuild=recreate;search=find;symbol=definition;references=callers;read=URI;record_fallback=raw lookup."New value: +"rebuild=recreate;search=find snippets;symbol=definition;references=find callers;read=URI;record_fallback=raw lookup."
  2. Changed7 schema fields changedv2.9.0
    • changedInput schema / properties / action / description
      Previous value: -"status=index;rebuild=recreate;update=refresh;remove=drop;search=find;symbol=definition;references=callers of symbol;read=URI;record_fallback=raw lookup."New value: +"rebuild=recreate;search=find;symbol=definition;references=callers;read=URI;record_fallback=raw lookup."
    • addedInput schema / properties / fallback_reason / description
      Added value: +"no_match|ambiguous|unresolved_import|unsupported_extension;else other"
    • changedInput schema / properties / kinds / items / enum
      Previous value: -[
      -  "module",
      -  "class",
      -  "function",
      -  "method",
      -  "route",
      -  "test",
      -  "comment"
      -]New value: +[
      +  "module",
      +  "class",
      +  "function",
      +  "method",
      +  "constant",
      +  "route",
      +  "test",
      +  "comment"
      +]
    • changedInput schema / properties / kinds / maxItems
      Previous value: -7New value: +8
    • addedInput schema / properties / request_id
      Added value: +{
      +  "maxLength": 36,
      +  "type": "string"
      +}
    • addedInput schema / properties / resource_uri / format
      Added value: +"starts_with"
    • removedOutput schema / additionalProperties
      Removed value: -true
  3. First observedv2.7.0

TDQS

D1.6/5.0
Behavior2/5

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

Annotations already carry the safety profile (destructiveHint=true, readOnlyHint=false), so the description needn't repeat it, but it adds no behavioral context: no mention that rebuild/update/remove mutate or destroy index state, no explanation of what 'fallback' entails, and no rate/authorization caveats. The bare word 'fallback' hints at behavior without disclosing it. No contradiction with the annotations.

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

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

At four words the description is short, but this is under-specification, not conciseness. There is no front-loaded purpose statement or sentence structure, and 'fallback' dangles without explanation. The brevity is achieved by discarding all substance rather than by trimming excess.

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

Completeness1/5

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

For a tool with 9 action modes, 15 parameters, index-mutation operations, and fallback-recording semantics, a four-word fragment is grossly inadequate. Even with an output schema available, the description fails to explain action selection, the difference between search/symbol/references/read, the required code://repo/ resource_uri format, or the destructive lifecycle — all of which an agent needs to invoke it correctly.

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

Parameters1/5

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

Schema description coverage is only 13% (solely the action enum labels), so the description must compensate — and it doesn't. None of the 15 parameters (path, kinds, query, symbol, resource_uri, recovered_evidence, etc.) are explained in the description. The four-word fragment adds no parameter meaning beyond what the schema already structurally shows.

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

Purpose2/5

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

The description, "Code index, symbols, callers, fallback," is a noun-phrase fragment with no verb stating what the tool does. 'Code index' loosely restates the tool name, and 'symbols'/'callers'/'fallback' hint at the domain but never state an action. An agent must open the action enum to learn the tool can rebuild, update, remove, search, read, and record fallback data.

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

Usage Guidelines1/5

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

No guidance is given for when to use this tool over siblings like knowledge_document, knowledge_files, or knowledge_admin. There is no 'use when' condition, no exclusions, and no mention of alternatives. The keyword fragment leaves tool selection entirely to inference from the schema.

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