Skip to main content
Glama
stornoro

Storno CLI

Official
by stornoro

declaration_build

Read-onlyIdempotent

Build ANAF declarations from plain JSON: generates XML, applies required-field and tax rules, computes amounts, and validates with DUKIntegrator/ANAF online, returning issues for fixes.

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

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.6/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnly, idempotent, non-destructive), and the description adds substantial extra context: what rules Storno applies, the arithmetic for D212, that C168 uses ANAF's authoritative online validator, that nothing is stored, and a 60 req/hour per IP rate limit. It also describes the exact return shape (valid, xml, issues[], validation{duk, anafOnline}) in the absence of an output schema.

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?

Front-loaded with the core action and the loop instruction is clearly placed at the end. It is dense and packed with parenthetical detail (D212 percentages, CASS tiers) that is helpful but borders on verbose for a single sentence block.

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 no output schema, the description fully specifies the return shape and issue levels, names the prerequisite (declaration_form_spec) and the follow-on (declaration_pdf), and discloses rate limits and statelessness. Nothing an agent needs to invoke it correctly is missing.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds meaning: it explains that `input` is plain JSON shaped by declaration_form_spec, that `online` triggers ANAF's authoritative C168 rules, and that validation is two-stage (DUK vs ANAF online). That goes beyond the one-line schema hints.

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?

States a specific verb+resource: 'Build an ANAF declaration from plain JSON', and immediately points to declaration_form_spec for the input schema. This distinguishes it from sibling tools like declaration_validate_xml (existing XML) and declarations_submit (filing). An agent can tell exactly what this does without opening 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?

Gives a clear workflow: build → fix issues → rebuild until valid=true → declaration_pdf, and names declaration_form_spec as the source of input shape. It stops short of explicitly contrasting with declaration_validate_xml or declarations_create/submit, so alternatives are implied rather than stated.

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