Skip to main content
Glama

Check a file against a form’s rules

check_file
Read-onlyIdempotent

Check whether a form will accept a file, from the file's facts: its real type (from its contents, not its name), size in bytes, and pixel size or PDF page count. Give either rules or a requirement id from find_upload_requirements (with the upload name for multi-upload forms, such as "ibps/signature"). The file itself is never sent. Returns each rule as passed or failed, and where to fix it.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "file": "<file>"
    },
    "name": "check_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYes
rulesNoThe form's rules, when there is no requirement id.
requirementNoA requirement id, such as "us-visa" or "ibps/signature".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description adds two things the annotations cannot: the privacy guarantee that 'the file itself is never sent' and the return shape ('each rule as passed or failed, and where to fix it'), which is needed because there is no output schema.

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?

Four dense sentences: purpose first, then inputs, then the privacy caveat, then the return value. Nothing is repeated from the schema and no sentence is filler.

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?

Covers the input contract, the either/or rule source, privacy, and output shape despite having no output schema — strong for a tool with nested objects. Missing only edge behavior, such as what happens with an unrecognized requirement id or a file whose facts are incomplete.

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?

Adds meaning beyond the 67%-covered schema: the file's type is the real type from contents rather than the extension, and size/pixel dimensions or page count are the only facts used. It also clarifies that 'rules' and 'requirement' are alternatives, a mutual exclusivity the schema does not express since only 'file' is required.

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 whether a form will accept a file' — and immediately scopes the source of truth ('from the file's facts'), which separates it from find_upload_requirements, named as the supplier of rules rather than a competitor for this check.

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?

Explicitly tells the caller to supply either rules or a requirement id from find_upload_requirements, including the multi-upload naming case ('ibps/signature'). It does not spell out a when-not-to-use condition or what to do if a requirement id is unknown, but the invocation context is unambiguous.

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.