Skip to main content
Glama

samply locate symbols

samply_locate_symbols
Read-onlyIdempotent

Map native stack symbols to likely source files across local code roots so agents can inspect implementation after hotspot analysis.

Instructions

Map native stack symbols back to likely source files in one or more local code roots. This is useful after hotspot analysis when an agent needs to inspect the implementation.

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": {
      "roots": "<roots>",
      "symbols": "<symbols>"
    },
    "name": "samply_locate_symbols"
  }
}

Input Schema

NameRequiredDescriptionDefault
rootsYesOne or more local source roots to search.
symbolsYesOne or more stack symbols or function display names to map back to source.
extensionsNoOptional file extensions to include, for example ['.rs', '.ts'].
maxHitsPerFileNoMaximum number of line hits to keep for each candidate file.
maxFilesPerSymbolNoMaximum number of candidate files to return per symbol.
maxFilesToScanPerRootNoMaximum number of files to scan under each root.

Output Schema

NameRequiredDescriptionDefault
rootsYes
symbolsYes
scannedFileCountYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

The annotations already declare that this is read-only, idempotent, non-destructive, and closed-world. The description adds useful nuance by saying results are 'likely' source files, implying heuristic matching, but it does not describe scan cost, confidence, or other operational behavior beyond that.

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?

Two short sentences front-load the purpose and then provide usage context, with no redundant wording. Every sentence contributes to selecting or understanding the tool.

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?

The tool has an output schema, fully described parameters, and rich annotations, so the description need not explain returns or safety. It supplies purpose and timing context, though it could say more about matching heuristics or scanning cost.

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 description coverage is 100%, so roots, symbols, extensions, and scan-limit parameters are already documented in the schema. The description adds no parameter-level meaning beyond referring generally to local code roots and stack symbols, making the baseline score appropriate.

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?

The description states a specific verb and resource: mapping native stack symbols back to likely source files across local code roots. It is clear what the tool does, but it does not explicitly differentiate itself from sibling tools such as samply_search_functions or samply_focus_functions.

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?

It gives a clear usage context: after hotspot analysis, when the agent needs to inspect the implementation. It does not state when not to use it or name alternative tools for adjacent tasks, so it falls short of full guidance.

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