Skip to main content
Glama

inspect_file

Checks how a file parses before diffing, reporting format, encoding, top-level shape, and warnings such as duplicate keys or multi-document YAML to help you anticipate surprising diffs.

Instructions

Check how a file parses before diffing it: format, encoding, top-level shape, warnings.

Surfaces things that make diffs surprising: duplicate keys (JSON, YAML, .env), multi-document YAML, comments in JSON, an unexpected delimiter or encoding in CSV. For CSV it reports the columns, the detected delimiter and the row count (streamed, so large files are fine).

Input Schema

NameRequiredDescriptionDefault
pathYes
formatNoauto
encodingNoauto
strip_commentsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses that the tool detects duplicate keys across JSON/YAML/.env, multi-document YAML, comments in JSON, and delimiter/encoding anomalies, and that CSV inspection reports columns, delimiter and row count. It also notes streaming behavior so large files are handled. It does not state side effects, error behavior, or that the operation is strictly read-only, which keeps it short of a 5.

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 purpose sentence is front-loaded and the supporting detail is organized by concern (surprising diffs, then CSV specifics). The middle catalogue of anomalies is dense but each item earns its place; only minor tightening is possible.

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?

An output schema exists, so return values need little explanation, and the description is adequate for a read-only inspection tool. However, with four undocumented parameters, the unmentioned 'strip_comments' flag and the 'auto' format/encoding defaults leave real behavioral gaps an agent must guess at.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and four parameters exist, so the description must compensate. 'Format' and 'encoding' appear only as reported outputs rather than as inputs, and 'strip_comments' is not addressed at all, nor is the 'auto' default explained. Meaning is left largely to inference from the enum.

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?

States a specific verb and resource ("Check how a file parses") and enumerates exactly what it reports: format, encoding, top-level shape, warnings. It also positions itself against the diffing siblings by saying it is done "before diffing it", so an agent can distinguish it from diff_files/csv_diff without opening a schema.

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 clear usage context: run it before a diff to understand why diffs look surprising. The condition that selects this tool (pre-diff verification) is explicit, though there are no exclusions or guidance on when to skip inspection and go straight to diff_files.

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