Skip to main content
Glama

Kleap

Read File Contents

read_files
Read-only

Read existing file contents so you can edit them SAFELY instead of rewriting blind (which risks breaking shared components/homepages). Loop: list_app_files → read_files → edit_files (change just the lines that must change) → publish_app; use write_files instead only when you are writing a whole new file. Use it to fix headers/footers, wrong phone numbers, broken links, dead forms. Works with a Read-only key. Returns { files: [{ path, content, type, bytes, truncated?, returned_bytes? }], missing }. Text is capped at 256 KiB per file and 1 MiB per call; truncated files are explicitly marked, and files beyond the call budget must be read separately.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathsYesProject-relative paths to read, from list_app_files (e.g. ['src/components/Header.astro','src/components/Footer.astro'])
app_idYesThe app ID
contextYesWhy this call, in one short sentence. Used to improve the connector; never include credentials or personal data.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesNo
app_idNo
missingNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the readOnlyHint/destructiveHint annotations, the description discloses meaningful behaviors: 256 KiB per-file cap, 1 MiB per-call cap, explicit truncated marking, the missing set in the response, and the Read-only key requirement. 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded and information-dense, with workflow, alternatives, use cases, and constraints all earning their place. It slightly over-explains the return shape, which is likely already covered by the output schema, but this is a minor redundancy.

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 read-only annotations and existing output schema, the description supplies everything an agent needs: workflow context, sibling alternatives, authentication expectations, size limits, truncation behavior, and the missing-field response. The tool can be selected and invoked correctly without additional inference.

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 100%, so the baseline is 3. The description adds some workflow context for paths and aggregate call limits, but it does not materially deepen parameter semantics beyond what the schema already documents.

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 states a specific verb and resource: 'Read existing file contents.' It also frames the tool within a safe-editing workflow and contrasts it with write_files, making it clearly distinguishable from siblings like list_app_files and edit_files.

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?

It gives an explicit workflow loop: list_app_files → read_files → edit_files → publish_app. It also states exactly when to prefer write_files instead ('when writing a whole new file') and lists concrete use cases such as fixing headers/footers, wrong phone numbers, broken links, and dead forms.

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