Skip to main content
Glama

Open Kioku Get Symbol Context

get_symbol_context
Read-onlyIdempotent

Retrieve a symbol's complete context bundle—definition, file location, scope, docs, and surrounding code—to understand impact before editing.

Instructions

Retrieve a comprehensive context bundle for one symbol, including its full definition body, file location and range, enclosing scope, documentation comments, and surrounding code context from the local index. Use to retrieve a comprehensive context bundle for one symbol, including its definition body, file location, enclosing scope, documentation comments, and surrounding code context when indexed. Returns more detail than get_definition. Do NOT use for simple definition lookup only (use get_definition), for fuzzy symbol search (use search_symbols), or for cross-reference tracing (use get_references). This is read-only and reads from the local index.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe exact or partial name of the symbol to retrieve comprehensive context for.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
valueNoWrapped non-object output, used for Markdown, TOON, or scalar responses.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.2.3
    • changedInput schema / properties / query / description
      Previous value: -"The name of the symbol."New value: +"The exact or partial name of the symbol to retrieve comprehensive context for."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "description": "The MCP structuredContent object returned by this Open Kioku tool. Most tools expose their JSON fields directly; string or scalar tool outputs are wrapped as {\"value\": ...}.",
      +  "properties": {
      +    "value": {
      +      "description": "Wrapped non-object output, used for Markdown, TOON, or scalar responses."
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed1 schema field changedv2.0.3
    • addedInput schema / properties / query / description
      Added value: +"The name of the symbol."
  3. First observedv2.0.1

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already provide readOnlyHint, idempotentHint, destructiveHint. Description adds that it is read-only and reads from local index, which is useful behavioral context beyond annotations.

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

Conciseness3/5

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

First sentence clearly states purpose, but the second sentence repeats similar information ('Use to retrieve...'). Some redundancy, could be more concise.

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

Completeness4/5

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

With output schema present, description need not explain return format. It lists included components (definition body, file location, etc.), which is sufficiently complete for agent understanding.

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 has 1 param with 100% description coverage. The tool description reiterates the param's purpose but does not add significant meaning beyond schema. Baseline of 3 is appropriate.

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

Purpose5/5

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

Explicitly states it retrieves comprehensive context for one symbol, listing components like definition body, file location, enclosing scope, comments, and surrounding code. Differentiates from siblings by naming get_definition, search_symbols, get_references.

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

Usage Guidelines5/5

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

Clearly defines when to use (comprehensive context) and provides explicit when-not-to-use scenarios with sibling tool names: get_definition for simple lookup, search_symbols for fuzzy search, get_references for cross-reference tracing.

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