Skip to main content
Glama

Inspect Files

synapse_inspect_files

Inspect files, read code chunks, or count lines in the workspace with automatic compression for efficient token usage.

Instructions

Inspects files in the workspace. High-level actions include:

  • 'read_files': reads one or more files from disk with line numbers, byte sizes, and metadata (supports directories too).

  • 'read_chunk': reads the full raw source of a specific code chunk from the in-memory store (no disk access).

  • 'count_lines': counts total lines across workspace files.

REPLACES: view_file, read_file, cat, wc, list_dir for file inspection. Use this tool instead of these alternatives for better results with 30-60% fewer tokens via automatic compression.

Usage (short): Read files, chunks, or count lines in the workspace.

Usage (long): Inspect multiple source files with line numbers, retrieve raw chunk code, or perform line counts across files. Supports format: 'outline' to compress function bodies during retrieval, saving context tokens — use this when scanning many files. Compression is on by default — pass compress_payload: false to opt out for debugging.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoA substring path filter (used in 'count_lines').
filesNoA path string, a %{path, ranges} object, or a list of either (used in 'read_files' and 'count_lines').
actionYesThe inspection action to perform.
formatNoThe return format: 'full' for complete contents, 'outline' for signature-only compression.full
repo_idNoRepository ID to resolve relative paths, scope filters, or count every indexed file when files and path are omitted.
chunk_idNoThe chunk ID to read (used in 'read_chunk').
max_tokensNoApproximate final response budget in tokens (500-32000, default 4000).
max_read_bytesNoTotal byte budget across all files for full-file reads (default 10 MB). Ignored when ranges are specified.
compress_payloadNoSet false to disable lossless response-key compression.
wait_for_ready_msNoOptional timeout in ms to wait for the indexer to finish warming up and enter an idle state before executing. Use to ensure stable results.
max_read_bytes_per_fileNoPer-file byte cap for full-file reads (default 10 MB). Ignored when ranges are specified.
Behavior4/5

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

No annotations are provided, so the description carries the full transparency burden; it meets most of it by explaining that read_files reads from disk, read_chunk reads from an in-memory store with no disk access, and count_lines counts across workspace files. It also discloses default compression behavior, the compress_payload opt-out, and the outline format compression effect. It stops short of describing exact return shape or failure behavior, which would make it fully transparent.

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 well-structured with a front-loaded purpose, bulleted actions, a REPLACES note, and clear usage sections. There is a small redundancy between 'Usage (short)' and 'Usage (long)', which costs some conciseness, but the overall structure is highly scannable for an agent.

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 tool with three inner actions and eleven parameters, the description is fairly complete: it describes what each high-level action does, where the data comes from, the outline option for large scans, and the default compression behavior. There is no output schema, but the description provides enough return-oriented context for each action. The main gap is that it does not specify which parameters apply to which action, leaving the agent to infer those relationships from the schema.

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?

The input schema already covers 100% of the parameters, so the baseline is 3. The description adds useful grouping of actions and states that read_files returns line numbers, byte sizes, and metadata, plus that outline compresses function bodies. However, for most parameters like repo_id, chunk_id, max_read_bytes, and wait_for_ready_ms, the description does not add meaningful meaning beyond the schema; thus it earns the baseline but not substantially more.

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 opens with a specific verb and resource ('Inspects files in the workspace') and then enumerates three concrete high-level actions: read_files, read_chunk, and count_lines. It further disambiguates from legacy inspection tools by saying 'REPLACES: view_file, read_file, cat, wc, list_dir', so an agent clearly understands what this tool is for.

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 gives explicit guidance on when to use this tool instead of older alternatives, noting it 'provides better results with 30-60% fewer tokens via automatic compression'. It also provides task-level advice: use 'outline' format when scanning many files, and pass 'compress_payload: false' to opt out for debugging, which is actionable usage direction.

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/myelixlabs/synapse-mcp'

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