Skip to main content
Glama

Br Validate Nfse Xml

br__validate_nfse_xml

Validate DPS or NFSe XML against ADN XSD v1.01. Automatically selects the correct schema from the root element and reports validity, errors, and warnings.

Instructions

Validar um DPS ou NFSe contra o XSD v1.01 do ADN.

Seleciona automaticamente o schema com base no elemento raiz:

  • <DPS> → valida contra DPS_v1.01.xsd (<ds:Signature> opcional)

  • <NFSe> → valida contra NFSe_v1.01.xsd (<ds:Signature> obrigatória)

Returns a dict with valid, errors, warnings, and schema_version.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xml_base64NoXML DPS ou NFSe codificado em base64.
xml_contentNoXML DPS ou NFSe como string. Informe xml_content ou xml_base64.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the behavior burden and does well: it discloses automatic schema selection, optional vs required ds:Signature per schema, and the return dict keys. It does not explicitly mention side effects or network usage, but a validation operation is inherently read-only and the description sufficiently exposes its behavior.

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 compact and well-structured: one purpose sentence, a bulleted schema-selection list, and a concise return summary. Every sentence earns its place and the most important information is front-loaded.

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?

For a two-parameter validation tool with an output schema, the description covers purpose, schema selection, signature requirements, and return fields. It does not state what happens if both xml_base64 and xml_content are supplied or omitted, but the schema's 'Informe xml_content ou xml_base64' guidance mitigates most ambiguity.

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 100%, and the description adds no parameter-specific meaning beyond clarifying that the XML can be a DPS or NFSe. The auto-selection behavior helps interpret what to pass but does not exceed the baseline expected when the schema already documents both parameters.

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 opens with a specific action ('Validar um DPS ou NFSe contra o XSD v1.01 do ADN') and clearly identifies the resource and validation standard. The root-element schema selection further differentiates this tool from siblings like br__validate_nfe_xml and br__validate_cte_xml.

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 establishes clear context: use for DPS/NFSe XML validation against the ADN XSD, with automatic schema selection by root element. It does not explicitly name alternatives or exclusions, but the sibling list and tool name make the applicable domain obvious.

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