Skip to main content
Glama

Synapse

Read one function, or a file outline

read_code
Read-onlyIdempotent

Read code without opening whole files. With symbol: just that function, method or class (numbered lines). Without: the file's outline (every declaration with its signature and line range). Use instead of reading a full file.

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>",
      "repository": "<repository>"
    },
    "name": "read_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesRepo-relative file path.
symbolNoFunction, method or class name, e.g. "refresh" or "AuthController.refresh".
repositoryYesPublic GitHub repository as "owner/name" (e.g. "pallets/flask") or its github.com URL.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so safety and idempotency need no restating. The description does add genuine context beyond them by describing the return shape in both modes (numbered lines for a symbol; declarations with signature and line range for an outline). It says nothing about missing-symbol behavior, size limits on very large files, or any rate/auth constraints, which are the plausible failure modes here.

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?

Three short sentences, front-loaded with the core value proposition and the two modes before the alternative recommendation. The trailing "Use instead of reading a full file" slightly restates the opening "without opening whole files", a small redundancy that keeps it from a 5.

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 read-only, three-parameter lookup with a fully described schema and no output schema, the description covers both call modes and their result shapes, which is the main thing an agent needs. What is absent is edge-case behavior (unknown symbol, oversized file, path containing directories) and how the two modes differ in cost, so it is not exhaustive.

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 100%, so the baseline is 3. The description earns above that by explaining the semantics of omitting the optional `symbol` parameter — the tool then returns a whole-file outline rather than an error — which the schema does not convey on its own. It also narrows `symbol` to function/method/class names, matching the schema example.

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 gives a specific verb and resource (read code) and explicitly splits it into two modes: with `symbol` it returns just that function, method or class; without it returns the file outline of every declaration with signature and line range. That is precise enough to act on. It stops short of naming a sibling (e.g. repo_map or find_existing) as the contrasting choice, so the boundary against other navigation tools is only partially drawn.

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?

"Use instead of reading a full file" states a clear preference and the condition (don't want the whole file) is implied by the two mode branches. What is missing is when-not guidance: no advice on choosing this over repo_map for repo-level exploration, or over find_existing/why when you don't yet know the file path.

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