Skip to main content
Glama

br__generate_cte

Generates an unsigned CT-e XML (modelo 57, schema 4.00) for rodoviário modal with ICMS CST 00. Returns XML, access key, and warnings; signature required before SEFAZ submission.

Instructions

Generate an unsigned CT-e XML (modelo 57, schema 4.00).

v1 supports modal rodoviário only and ICMS CST 00 (tributação normal) only — other modais/CSTs raise an error. The returned <CTe><infCte>…</infCte></CTe> document does not include <Signature> — sign it with br__sign_cte (roadmap BR-CTE-6 factory, tool not yet registered) before SEFAZ submission.

Returns a dict with:

  • xml: the generated CT-e XML string

  • chave_acesso: the computed 44-character access key (chCTe)

  • warnings: list of non-fatal notices

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cteYesCT-e data matching the BRCTeDocument schema (modelo 57)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations, the description fully discloses behavioral traits: unsupported modals/CSTs cause errors, output lacks signature, and return dict structure.

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?

Very concise, front-loaded with main purpose, followed by limitations, post-processing steps, and return fields in bullet format – no wasted words.

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?

Given 1 parameter, output schema, and sibling context, the description is complete: it explains constraints, necessary next steps, and return values adequately.

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?

The input schema already provides a description (100% coverage), but the tool description adds value by specifying model, modal, and CST constraints beyond the schema.

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 clearly states the tool generates an unsigned CT-e XML (modelo 57, schema 4.00), specifies limitations (modal rodoviário, ICMS CST 00), and distinguishes from siblings like br__sign_cte and other generate tools.

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?

It explicitly says to use only for modal rodoviário and ICMS CST 00, errors others, and advises signing with br__sign_cte before SEFAZ submission, providing clear when-to-use and alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cmendezs/mcp-nfe-br'

If you have feedback or need assistance with the MCP directory API, please join our Discord server