Skip to main content
Glama

read_world_code_file

Read-onlyIdempotent

Read up to 400 numbered lines from one staged project file, bounded to 12 KB. Returns its current hash for exact patches. Default reads 160 lines. Follow nextRead (startLine/startColumn) to read omitted source, including long minified lines. Never guess omitted code.

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": {
      "workspaceId": "<workspaceId>",
      "codeWorkspaceId": "<codeWorkspaceId>",
      "path": "<path>"
    },
    "name": "read_world_code_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
endLineNo
startLineNo
startColumnNo
workspaceIdYes
codeWorkspaceIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / codeWorkspaceId / $ref
      Removed value: -"#/properties/workspaceId"
    • addedInput schema / properties / codeWorkspaceId / pattern
      Added value: +"^[A-Za-z0-9_-]{1,128}$"
    • addedInput schema / properties / codeWorkspaceId / type
      Added value: +"string"
    • addedInput schema / properties / endLine / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / startColumn / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / startLine / maximum
      Added value: +9007199254740991
  2. Added

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds real value beyond that: a 12 KB bound, default 160-line window, numbered-line output, a returned hash intended for exact patches, and a nextRead continuation protocol. It does not describe error cases (missing path, line past EOF) or whether endLine is clamped, but the behavioral profile is substantially richer than the annotations alone.

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?

Four short sentences, front-loaded with capability and limits, then the returned hash, then the continuation rule and the caution. Nearly every clause earns its place; only the missing parameter explanation counts against it.

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 6-parameter, zero-coverage, no-output-schema read tool, the description covers output (numbered lines, hash) and pagination well. The gap is the two required workspace identifiers, which no structured field explains, so an agent must infer their meaning from convention.

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 0%, so the description has to carry parameter meaning, and it only partly does: startLine/startColumn are tied to nextRead and the 160-line default implies endLine behavior. The two required scope identifiers, workspaceId and codeWorkspaceId, and the path length cap are left entirely unexplained.

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 ('Read ... numbered lines from one staged project file') along with hard limits (400 lines, 12 KB) and the returned hash. That sharply separates it from search_world_code and apply_world_code_patch, though no sibling is named explicitly.

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?

Gives concrete operating guidance: default read is 160 lines, follow nextRead (startLine/startColumn) for omitted source including long minified lines, and 'Never guess omitted code.' It does not explicitly state when to prefer this over search_world_code or when a read is unnecessary, so it falls short of the 5 bar.

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.