Skip to main content
Glama

get_symbol

Retrieve the source code and line numbers for a function, method, or class, optionally targeting a specific overload with @LINE for precise code inspection.

Instructions

Source of one function, method or class, with line numbers. name: 'func', 'Class', 'Class.method', 'path/File.java:Class.method'; add '@LINE' to pick one overload, e.g. 'Cart.add@27'.

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

Input Schema

NameRequiredDescriptionDefault
nameYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It adds one useful behavioral detail ('with line numbers') but is silent on whether the operation is read-only, how ambiguity or multiple matches are handled, and whether the lookup spans the whole repository. The presence of an output schema lowers the bar for return-value explanation.

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?

Three short lines, front-loaded with the purpose, then the parameter format and overload syntax. Every sentence adds information; nothing is redundant.

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?

For a single-parameter read tool with an output schema, the description covers purpose and the full range of accepted name syntax. Remaining gaps are ambiguity handling and repository scope, which are secondary for correct invocation.

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

Parameters4/5

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

Schema coverage is 0%, so the description must carry parameter meaning, and it does: it enumerates accepted name forms ('func', 'Class', 'Class.method', 'path/File.java:Class.method') and explains the '@LINE' overload selector with an example. It stops short of stating whether partial/unqualified names are resolved or what happens on ambiguous matches.

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?

States a specific verb and resource: retrieves the source of one function, method or class, with line numbers. An agent can tell it apart from sibling names like outline or replace_symbol by the 'source of one symbol' framing, though the description never explicitly contrasts them.

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 implied by the purpose (fetch source for a single named symbol) but there is no explicit when-to-use or when-not guidance, and no mention of alternatives such as outline for structural views or who_calls for callers. The agent must infer the selection rule from the name and siblings.

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