Skip to main content
Glama

validar_xml

Validates tax group or invoice XML against the official XSD to catch schema errors before submission.

Instructions

Valida um XML (grupo de tributação ou nota) contra o XSD oficial.

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": {
      "xml": "<xml>"
    },
    "name": "validar_xml"
  }
}

Input Schema

NameRequiredDescriptionDefault
xmlYes
tipoNonfe
subtipoNogrupo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.7/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. It states the validation target (official XSD) but not whether a failed validation raises an error or returns a message list, whether the XSD is fetched remotely, or whether the call has side effects — all material for a validation 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?

A single front-loaded sentence with no filler, and the validation target is stated before the parenthetical detail. It is efficient, though the brevity contributes to the gaps elsewhere rather than being purely a virtue.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a three-parameter validation tool with no annotations and no output schema, the description should at minimum say what a validation result looks like and what 'tipo' selects. Neither is covered, leaving the agent unable to predict the response shape.

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

Parameters2/5

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

Schema description coverage is 0% across three parameters. The description hints that the XML may be a tax group or a nota, loosely mapping to the subtipo enum, but the 'tipo' parameter (default 'nfe') is never explained and no accepted values or format for 'xml' are given.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb+resource combination ('Valida um XML ... contra o XSD oficial') and names the two document kinds it accepts (grupo de tributação or nota), which distinguishes it from generation/consultation siblings like gerar_xml. It stops short of explicitly naming an alternative tool, so it sits at 4 rather than 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use guidance, no precondition (e.g. 'call after gerar_xml', 'run before submitting to SEFAZ'), and no exclusions. The only implied usage is 'validate XML', which the agent must infer from the name and purpose statement.

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