Skip to main content
Glama
stornoro

Storno CLI

by stornoro

declaration_build

Builds ANAF declarations from JSON, applying rules and arithmetic, validates via DUKIntegrator and online validator, returns XML and issues, loops until valid, then generates PDF.

Instructions

Build an ANAF declaration from plain JSON (schema from declaration_form_spec): Storno writes the XML, applies its own rules (required fields, address codes, quotas, postal code, tenant CNP …), does the arithmetic (D212: 20 % forfait, 10 % tax, CASS tiers on the minimum wage), validates it with ANAF's DUKIntegrator and, for C168, with ANAF's online validator behind the web form (the authoritative BR-C168 rules). Returns valid, xml, issues[{level: error|warning|info, code, field, message}] (info = computed amounts to explain to the user) and validation{duk, anafOnline}. Loop: fix issues → build again until valid=true, then declaration_pdf. Public, nothing stored, 60 requests/hour per IP.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYesForm code, e.g. C168
inputYesThe form input (see declaration_form_spec → input / example)
onlineNoAlso run ANAF's online validator when available (default true)
validateNoRun the DUK validator (default true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.28

TDQS

A4.3/5.0
Behavior5/5

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

The description discloses the full behavior: XML generation, rule application, arithmetic, validation with DUKIntegrator and ANAF's online validator, return fields, and the fact that nothing is stored. It also states the tool is public and rate-limited, leaving no major side effects or hidden behavior unaddressed.

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?

The description is dense but well-structured, covering purpose, rules, validation, outputs, and usage in a compact paragraph. A few extraneous details (e.g., 'Storno writes the XML') and the long parenthetical arithmetic list slightly reduce readability, but it remains efficient.

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?

The description covers the input contract, validation behavior, output shape, loop guidance, and rate limit, which is sufficient for a caller. Since there is no output schema, the inline return description is valuable, though error-handling specifics and parameter interactions could be more explicit.

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?

The schema already covers all parameter descriptions and the required fields, while the description adds context about the schema source and validation flow. It does not add much individual parameter-level meaning beyond what the schema provides, so a baseline score is appropriate.

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 identifies the action ('Build an ANAF declaration') and the input format ('plain JSON' with schema from declaration_form_spec). It also states the validation workflow and eventual handoff to declaration_pdf, making the tool's purpose unambiguous.

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?

The description explains the intended iterative usage: fix issues, rebuild until valid, then generate the PDF. It also notes public availability and the rate limit. It does not explicitly contrast with sibling tools like declarations_prepare or declaration_validate_xml, but the workflow guidance is otherwise clear.

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

Deploy Server

Other Tools