Skip to main content
Glama

JSON to CSV transform module with pytest tests

submit_json_csv_conversion
Idempotent

Produce a standard-library Python module that renders a JSON array of objects as CSV text, plus pytest tests. Choose this when you need a tested function that renders a JSON array of objects as CSV, using the union of keys as the header. Do not choose this when you need the conversion performed on your data now, or when the CSV format must be bespoke (delimiter, quoting rules). Example requests: Write a Python function that renders a JSON array of objects as CSV, with tests. | I need JSON to CSV with the header being the union of all keys. | Generate a JSON-to-CSV module and prove it with pytest.

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": {
      "inputs": "<inputs>",
      "authorized_by": "<authorized_by>"
    },
    "name": "submit_json_csv_conversion"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputsYes
quote_idNoThe quote_id returned by POST /v1/jobs. Required to authorize a priced capability; the service rejects a priced job that does not name the quote it issued.
authorized_byYesIdentifier of the human or agent authorizing this job.
accepted_priceNoThe amount accepted, exactly as quoted (for example "5.00" or 5). Checked against the stored quote, so a price that moved between quote and authorize is refused rather than silently absorbed. Optional, but sent to make the acceptance explicit.

Output Schema

NameRequiredDescriptionDefault
quoteNo
stateYes
job_idYes
artifactsNo
access_tokenNoPer-job credential. Present it as the X-Job-Token header to read the job or list it. Keep it; it is the only credential for this job.
verificationNoIndependent verification. verification.ok = false means the job failed, not a partial success.
capability_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare non-read-only, non-destructive, idempotent, closed-world, so the safety profile is covered. The description adds that the behaviour is fixed by the template and verified by the template's own tests, which is useful. It does not disclose the priced/authorized job flow or what the caller receives back (generated files? code text?), which is the main behavioral unknown for a submission tool.

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 the deliverable and structured into what/choose/do-not-choose/examples, which is easy to scan. Minor redundancy: the core 'renders a JSON array of objects as CSV' phrase appears in the title, the opening sentence, and the choose-when clause.

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?

An output schema exists and the description nails the discrimination task, so nothing critical is missing for correct selection. For a nested, priced, authorized submission tool, it could have said one line about the quote/authorization flow, though the schema already documents it.

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

Parameters3/5

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

Schema description coverage is 75%, so the schema already carries module_name, function_name, template, quote_id, and accepted_price semantics. The description says nothing about any parameter — it never mentions the template constraint or the quote/pricing authorization, so it adds essentially no meaning over the schema. Baseline 3 applies.

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 precise deliverable: a standard-library Python module that renders a JSON array of objects as CSV, plus pytest tests, with the additional detail that the header is the union of keys. That level of specificity (template-based code generation, not data conversion) distinguishes it from siblings like submit_csv_to_json_rows or submit_json_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?

Explicit exclusion is present and load-bearing: 'Do not choose this when you need the conversion performed on your data now, or when the CSV format must be bespoke (delimiter, quoting rules).' That cleanly separates code-generation from data-transformation use. It stops short of naming the sibling tool that handles the excluded case, so the routing requires one inference step.

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.

Resources