Skip to main content
Glama
@filesniff/mcp
by Peth-Dev

sniff_file

Identifies a local file by binary magic bytes and container structure instead of its filename extension, detecting mismatches such as MP4 disguised as PDF or Word saved as .zip.

Instructions

Identify a local file from its binary magic bytes and container structure without trusting its filename extension. Detects mismatches (e.g. an MP4 disguised as a PDF or a Word document saved as .zip).

Input Schema

NameRequiredDescriptionDefault
pathYesPath to the local file to inspect.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full disclosure burden. It usefully discloses the detection mechanism (magic bytes plus container structure) and the key premise that the extension is untrusted, which implies a side-effect-free read of local content. It does not say what is returned (detected type, mismatch flag, both), how unreadable or nonexistent paths are handled, or whether the whole file or only headers are read.

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?

Two tight sentences: the mechanism and the trust model come first, and two parenthetical examples make the value concrete. No filler, no repetition of the tool name.

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?

The tool is simple, with one required parameter and no annotations. But there is no output schema, so the description is the only place an agent can learn what 'identify' returns, and it does not say. That gap matters for an agent that has to decide what to do with the result.

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?

There is a single parameter with 100% schema description coverage ('Path to the local file to inspect'), so the schema already carries the meaning. The description adds the relevant constraint that content rather than the extension is authoritative, but nothing else about the path parameter needs explaining.

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?

The description gives a specific verb and resource: 'Identify a local file from its binary magic bytes and container structure.' It also scopes the tool with 'without trusting its filename extension' and gives concrete examples of the mismatches it detects. It never names the sibling tools inspect_office_document or strip_image_metadata, so an agent must infer the boundary with those from their names alone.

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

Usage Guidelines3/5

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

The use case comes only from implication: verify true file type, catch a disguise. It does not state when to use this tool instead of inspect_office_document for Office files, or whether it is meant as a pre-check before other inspection tools. No prerequisites or exclusions are given.

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