Skip to main content
Glama

localGetFileContent

Read-onlyIdempotent

Read file content from the local filesystem with support for full file retrieval, line ranges, and pattern matching with context lines.

Instructions

Read file content [LOCAL: filesystem]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queriesYesQueries for localGetFileContent (1–5 per call). Review schema before use.
responseCharOffsetNoCharacter offset for top-level bulk response pagination across results[]. Use when a multi-query response was auto-paginated.
responseCharLengthNoCharacter budget for top-level bulk response pagination across results[]. Overrides the shared default for this call.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultsYesArray of results, one per input query, discriminated by status
responsePaginationNoPagination metadata for top-level bulk response pagination across results[]
Behavior5/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false. The description adds significant behavioral context beyond annotations, such as the ability to read specific lines, match patterns, pagination via charOffset/charLength, and token efficiency warnings for large files. There is no contradiction with annotations.

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?

The description is well-structured with clear sections (<when>, <gotchas>, <examples>) that are front-loaded. Despite length, every section earns its place by providing essential context, guidelines, or examples. No redundant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (multiple parameters, pagination, batch queries) and the presence of annotations and output schema, the description is complete. It covers when to use, how to use, pitfalls, examples, and alternatives, leaving no ambiguity for the agent.

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 description coverage is 100%, so baseline is 3. The description adds value beyond the schema through examples and gotchas that illustrate parameter combinations (e.g., using startLine/endLine for known ranges, fullContent for small configs). It clarifies pagination parameters and the batch nature of queries, which enhances understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Read file content [LOCAL: filesystem]' and lists specific use cases in the <when> section, such as reading implementation after locating with search/LSP and reading configs/docs directly. It also distinguishes from sibling tools by stating 'Direct read OK for: configs, docs, .json, .md, .yaml' and providing alternatives like LSP tools for certain tasks.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides extensive usage guidelines through sections like <when>, <fromTool>, <flow_questions>, and <gotchas>. It explicitly tells when to use the tool, when to prefer alternatives (e.g., LSP tools for flow analysis), and best practices (e.g., use matchString for large files, startLine/endLine for known ranges).

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bgauryy/octocode-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server