Skip to main content
Glama

Turn a text file into JSON

shape_file_to_json
Read-onlyIdempotent

Read a local UTF-8 text file (key-value notes, CSV/TSV, or Markdown table) and convert it to typed JSON, so you can parse file data without pasting or altering it.

Instructions

Read a local text file (key: value notes, .csv, .tsv or a Markdown table) and return typed JSON.

Use this when the data is in a file on this computer, so you don't have to paste it. The file is only read, never changed. Do not use it for Excel (.xlsx), PDF or other binary files, for files that are already JSON, or for app logs.

path: full path to a UTF-8 text file, up to 5 MB. format: "auto" (default) picks for you. Or force "kv" (key: value or key=value lines, a blank line starts a new record), "csv" (comma, semicolon, tab or | separated, first row is the header) or "markdown" (a | pipe | table, first row is the header).

Returns {"format": , "data": }, the same as shape_text_to_json.

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>"
    },
    "name": "shape_file_to_json"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesFull path to a UTF-8 text file (.txt, .csv, .tsv, .md), up to 5 MB.
formatNoInput format. "auto" picks for you; "kv" = key: value lines, "csv" = CSV/TSV, "markdown" = a pipe table.auto

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover read-only, idempotent, non-destructive and closed-world, and the description still adds real information: the 5 MB ceiling, the UTF-8 requirement, and the explicit 'only read, never changed' guarantee. It also describes the return envelope, which annotations do not.

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?

Front-loaded with purpose, then usage boundaries, then parameter notes, then return shape — a sensible order with no filler. Slightly long, but every block carries distinct information; only the cross-reference to shape_text_to_json could be trimmed.

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?

No output schema exists, yet the description supplies the exact return shape ({"format", "data"}), documents size and encoding limits, and explains each format enum value. Nothing an agent needs to select or invoke the tool correctly is missing.

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?

Schema coverage is 100%, so baseline applies, but the description genuinely adds meaning: 'kv' accepts key=value as well as key: value and treats a blank line as a record separator, 'csv' accepts comma/semicolon/tab/pipe, and both 'csv' and 'markdown' treat the first row as header. Only 'auto' selection logic is left as a black box.

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 (read a local text file, return typed JSON) and immediately enumerates the accepted input shapes (key: value notes, .csv, .tsv, Markdown table). The opening 'local text file ... on this computer' cleanly separates it from the sibling that handles pasted text.

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?

Gives explicit when-to-use ('data is in a file on this computer, so you don't have to paste it') and explicit when-not ('not for Excel, PDF or other binary files, for files that are already JSON, or for app logs'). It also names shape_text_to_json as the equivalent-output sibling, so the agent has a routing signal.

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