Skip to main content
Glama

Read analyzed source

analysis.source.get
Read-only

Read a bounded source excerpt from the pinned commit for a file present in an authorized semantic analysis.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "src/main.go",
      "end_line": 80,
      "start_line": 1,
      "analysis_id": "rna_example"
    },
    "name": "analysis.source.get"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesrepository-relative path already present in the semantic graph
end_lineNo
start_lineNo
analysis_idYes
organization_idNoorganization membership to use for this call; omit only when the account has one current membership

Output Schema

NameRequiredDescriptionDefault
sourceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already establish a safe read (readOnlyHint=true, openWorldHint=false). The description adds real context beyond that: the read is bounded (not a whole-file fetch), it reflects a pinned commit rather than current HEAD, and it requires an authorized analysis containing the file. Missing only details like permission failures or whether the pin can drift.

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 no filler; the core action and constraints arrive immediately. It is dense but readable, and nothing is repeated from the schema or annotations.

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 an output schema present, return values need no explanation, and annotations cover the safety profile. The description supplies scope, pinning, and prerequisite context, leaving only line-range defaults and error behavior unstated.

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 coverage is 40%, so path and organization_id are documented but analysis_id, start_line, and end_line are not. The description hints at bounded ranges and an analysis scope, but does not define line-range semantics (inclusive? defaults?), which leaves the two undocumented numeric params under-specified.

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 (read) and resource (bounded source excerpt), plus two sharp scope qualifiers: the excerpt comes from the pinned commit and the file must be present in an authorized semantic analysis. This distinguishes it from analysis.get/analysis.query, though it never names a sibling explicitly, keeping it short of a 5.

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 scope wording ('a file present in an authorized semantic analysis'), so an agent can infer you must already have run analysis.start. However, there is no explicit when-to-use/when-not-to-use guidance and no routing to analysis.get or analysis.query for other needs.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources