Skip to main content
Glama

locate_surgical_context

Finds exact class and function bodies, dependencies, and external test references for a task, returning ~500 tokens of focused context instead of reading whole files.

Instructions

Zero Multi-File Guessing: Locates the exact class and function bodies, dependencies, and external test references needed for a task, returning ~500 tokens of surgical context without reading bloated files.

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": {
      "task": "<task>"
    },
    "name": "locate_surgical_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
taskYesTask description or target symbol names (e.g. 'Extract SleepInhibitor from cli.py')
root_dirNoRepository root path (default: '.').
target_symbolsNoOptional list of exact symbol names to extract context for

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A3.6/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 behavioral burden. It usefully discloses output volume (~500 tokens) and implicit read-only extraction from a repository, but says nothing about failure behavior (missing symbols, huge repos), determinism, or whether any files/state are touched.

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 well-compressed sentence that front-loads the value and ends with the concrete output characteristic. The slogan-like opener 'Zero Multi-File Guessing' is mild filler but is immediately followed by substantive content.

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?

For a 3-parameter, fully documented read tool with no output schema, the description covers what comes back (bodies, dependencies, test references) but omits how selection works and any limitations. Adequate but with clear gaps for an agent deciding to trust the returned slice.

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?

All three parameters have full schema description coverage, so the baseline is 3. The description adds only that extraction is scoped to a 'task' and returns bodies/dependencies; it gives no extra syntax guidance for task strings or target_symbols beyond what the schema already states.

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?

The description pairs a specific verb (locates) with a specific resource set (class and function bodies, dependencies, external test references) scoped to a task. That is concrete enough to distinguish it from audit/digest/workflow siblings in the same catalog without needing their schemas.

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

Usage Guidelines3/5

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

Usage is only implied: the phrase 'needed for a task' and 'without reading bloated files' suggests the situation (gather targeted context rather than reading whole files), but it never states when this tool is preferred over planning/retrieval-dedicated siblings or when it is unnecessary. No exclusions or prerequisites are given.

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