Skip to main content
Glama

XML to JSON conversion module with pytest tests

submit_xml_json_conversion
Idempotent

Produce a standard-library Python module that converts an XML document into JSON, plus pytest tests. Choose this when you need a tested, standard-library XML-to-JSON conversion that keeps attributes as '@name' keys and collects repeated elements. Do not choose this when the document uses DTDs, external entities, or namespaces: those are not resolved. It is also a code deliverable, not a conversion of your specific file. Example requests: Write a Python module that converts an XML document into JSON, with tests. | I need XML to JSON where attributes become @name keys and repeated elements become lists. | Generate an XML-to-JSON converter and test it, including malformed XML.

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_xml_json_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

A4.5/5.0
Behavior5/5

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

Beyond the annotations, the description discloses important behavioral limits: DTDs, external entities, and namespaces are not resolved, and the result is a code deliverable rather than conversion of the user's specific file. It also identifies the output as a tested standard-library module, which meaningfully supplements the idempotent and non-destructive annotations.

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?

The description is front-loaded with the core deliverable, followed by usage conditions, exclusions, and compact example requests. Every sentence supports selection or correct invocation, with no redundant restatement of the title.

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?

For a nested-parameter code-generation capability with an output schema, the description provides enough context to choose and invoke it correctly: deliverable type, conversion semantics, test requirement, unsupported XML features, and the fact that it does not convert the caller's file. Remaining schema-level details such as quote authorization and accepted_price are covered by the input schema.

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%, and the schema documents module_name, function_name, template, quote_id, and accepted_price. The description does not explain the parameters themselves, but the schema already carries most of that burden and the description adds conversion-behavior context such as '@name' attributes and repeated-element lists.

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?

The description states a specific verb and resource: produce a standard-library Python module that converts XML to JSON plus pytest tests. It clearly distinguishes this XML-to-JSON code deliverable from a conversion of the caller's own file, so an agent can identify the capability without inspecting the 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?

It gives explicit when-to-use and when-not-to-use guidance, including DTDs, external entities, namespaces, and the distinction from converting a specific file. It does not name a specific sibling tool to use instead when those exclusions apply, so it falls short of the strongest alternative-routing guidance.

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