Skip to main content
Glama
Repository Context MCP

Repository Context MCP

by itsaksh

get_symbol_context

Read-onlyIdempotent

Read a bounded source excerpt for a qualified Python symbol by path and name, enabling inspection of implementation context without importing or executing repository code.

Instructions

Read a bounded source excerpt for a qualified symbol.

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": {
      "path": "<path>",
      "name": "<name>"
    },
    "name": "get_symbol_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
pathYes
max_charsNo

Output Schema

NameRequiredDescriptionDefault
dataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

C2.9/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so safety is covered without the description. The word "bounded" hints at truncation, but the description never states what happens when the symbol is missing, oversized, or ambiguous, nor how truncation is signaled. It adds a little beyond annotations but leaves real behavioral questions open.

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

Conciseness4/5

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

A single front-loaded sentence with zero filler. It is efficient, but the terseness comes at the cost of specification rather than being purely economical.

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?

An output schema exists, so return structure needn't be described, and annotations cover the safety profile. However, for a three-parameter tool with no schema documentation, the description should at least define "qualified symbol" and clarify how the excerpt is bounded; neither is present.

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

Parameters2/5

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

Schema description coverage is 0% for three parameters, so the description carries the full burden and largely fails it: it never explains the format of path, what makes a name "qualified" (fully qualified path? kind prefix?), or that max_chars caps the excerpt. Only "bounded" indirectly gestures at max_chars.

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?

"Read a bounded source excerpt for a qualified symbol" gives a specific verb (read), a specific resource (source excerpt), and a qualifier (bounded, symbol-scoped). It is clear what the tool returns, though it never contrasts itself with siblings like search_code or list_symbols.

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?

There is no explicit when-to-use statement, no prerequisites, and no named alternative. The agent can only infer that this applies once a symbol is already known, which is weak guidance among search_code, list_symbols, and the get_* siblings.

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