Skip to main content
Glama
sheet2json-mcp

sheet2json-mcp

by tony-allex

convert_file

Convert Excel or CSV rows into JSON records validated against predefined schemas, with row-level errors reported and optional output saving only when validation passes.

Instructions

Convert a spreadsheet into JSON records that match one of the predefined schemas.

Every row is either converted and validated, or listed in errors with its row number and reason. Rows are never silently dropped or corrected.

Args: path: File path relative to the data folder. schema: Name of the target schema (see list_schemas). sheet: Excel sheet name. Defaults to the first sheet. decimal_separator: "." (1,234.5) or "," (1.234,5 - common in Danish files). write_output: Save the result as JSON in the output folder. Only allowed when there are no errors, so partial data never ends up downstream.

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": {
      "path": "<path>",
      "schema": "<schema>"
    },
    "name": "convert_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
sheetNo
schemaYes
write_outputNo
decimal_separatorNo.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations supplied, the description carries the burden well: it discloses the all-or-nothing validation model, that failures surface in an `errors` list with row numbers and reasons, that rows are never silently dropped or corrected, and that output writing is gated on a clean run. It omits permission requirements or effects on existing output files, which are the remaining behavioral gaps.

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?

Purpose is front-loaded, followed by the validation contract, then a compact Args block. The sentence 'Rows are never silently dropped or corrected' slightly restates the preceding guarantee, but overall there is little waste.

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?

An output schema exists, so return-value explanation is unnecessary, and the description still usefully names the `errors` field. For a five-parameter conversion tool with no annotations, the definition covers the operational rules an agent needs to call it correctly.

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

Parameters5/5

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

Schema coverage is 0%, so the description must compensate and it does: every one of the five parameters is explained, including path being relative to the data folder, the meaning of both decimal_separator values with a locale example, and the conditional restriction on write_output. This adds substantial meaning beyond the bare typed schema.

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 ('Convert a spreadsheet into JSON records') plus the constraint that records must match one of the predefined schemas. It differentiates itself from siblings by pointing to list_schemas for schema names and by being the only tool that converts, not inspects.

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 concrete usage facts: schema names come from list_schemas, sheet defaults to the first sheet, write_output is only permitted when there are no errors. It stops short of explicitly contrasting with inspect_file or list_files, so there is no full when-not-to-use guidance.

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

Deploy Server

Other Tools