Skip to main content
Glama
stornoro

Storno CLI

Official
by stornoro

agent_sign_pdf

Signs one or more PDF files with a qualified certificate via the local Storno Agent, embedding a PAdES/CMS signature and writing each signed copy as .signed.pdf.

Instructions

Sign one or many PDF files with the qualified certificate through the local Storno Agent (PAdES/CMS signature embedded in the PDF), e.g. declarations produced by DUKIntegrator, contracts, any document ANAF or a partner wants signed. Pass file paths and/or directories (all *.pdf inside); each signed copy is written next to the original as .signed.pdf (or into outDir). Requires the certificate PIN (pin, STORNO_AGENT_PIN, or the PIN remembered on this computer by the agent); the batch stops at the first PIN error to protect the token.

Input Schema

NameRequiredDescriptionDefault
pinNoToken PIN; defaults to STORNO_AGENT_PIN, or to the PIN the agent remembers for this certificate
filesYesPDF paths and/or directories
outDirNoDirectory for the signed copies (default: next to each file)
visibleNoDraw a visible signature box in the footer of the last page ("Semnat digital de …", date, issuer). Default: invisible signature (still verifiable in Adobe Reader / ANAF)
signerNameNoName shown in the visible box (default: the certificate subject)
certificateIdYesCertificate id from agent_certificates

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.0.37
    • changedInput schema / properties / pin / description
      Previous value: -"Token PIN; defaults to STORNO_AGENT_PIN"New value: +"Token PIN; defaults to STORNO_AGENT_PIN, or to the PIN the agent remembers for this certificate"
  2. Addedv1.0.28

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations, it discloses that the original is untouched and a new <name>.signed.pdf copy is written next to it (or into outDir), that directories are expanded to all *.pdf inside, that PIN resolution follows a fallback chain (pin → STORNO_AGENT_PIN → remembered PIN), and that the batch aborts at the first PIN error to protect the token from lockout. Those are exactly the operational facts an agent cannot infer from the schema or the readOnly/destructive hints.

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?

Everything is packed into one dense paragraph, but it is front-loaded with the verb and purpose, and each clause carries information (mechanism, examples, input shape, output location, PIN requirements, failure semantics). Slightly long and unsegmented, but no filler sentences.

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?

For a 6-parameter mutation tool with no output schema, the description covers both the effect (a signed copy alongside the original or in outDir) and the failure mode (stop at first PIN error), which substitutes for the missing return documentation. An agent has everything needed to call it correctly and anticipate the results.

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 baseline is 3; the description adds real value by stating the output naming convention, that directories are accepted for files, and the PIN precedence order. It still leaves the interaction between visible/signerName and the default (certificate subject) largely to the schema, so it is good rather than exceptional.

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 verb and resource ('Sign one or many PDF files') plus the mechanism (qualified certificate via the local Storno Agent, PAdES/CMS embedded). It is clearly distinguishable from siblings such as agent_submit_declaration_pdf or agent_certificates because it names the input (arbitrary PDF paths/directories) and the output artifact.

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 gives concrete usage context ('declarations produced by DUKIntegrator, contracts, any document ANAF or a partner wants signed') and states the certificateId must come from agent_certificates, which is effectively a prerequisite. It does not explicitly say when to prefer the sibling agent_submit_declaration_pdf for declaration flows, so it falls short of a full when/when-not/alternatives answer.

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