Skip to main content
Glama

Invert Standard Book

invert_standard_book
Read-only

Turns one Standard Books document back into the standard documents a workspace ingests to reproduce it: the chart; a statement for each bank, card or cash register, made from the entries that post to it; the invoices, bills, receipts and credits it records; and a declaration for each entry no document carries. Supply the book by transfer handle (a sealed book package, a book body, or {book, annotations}), or a small one inline as book; it is authenticated when sealed and admitted under book law first.

Every document comes back sealed, each behind its own multi-read handle, in submit_batches: pass each batch to register as its items, the chart first, then submit and post. Nothing is registered here and no model runs. An entry the inversion can neither document nor declare is named in unresolved_entries; a statement submit would refuse — an identity the book does not hold (an account with no institution or number, or one the book filled in itself, which the chart then does not claim), or a document whose own law fails (a receipt whose items do not sum to its amount) — is named in withheld with the reason and left out of the batches, which submit would otherwise refuse whole. Either way the documents do not reproduce the book, and status is needs_information. report_handle names the whole inversion: how each entry was routed, and every finding with its evidence.

Input Schema

NameRequiredDescriptionDefault
bookNoA small book inline: a sealed book package, a book body, or {book, annotations}. Exclusive with handle.
handleNoWorkspace-scoped transfer handle (upload:N or download:N) naming the book: a sealed book package, a book body, or {book, annotations}. The usual path, e.g. create_standard_book's handle.
workspace_tagYesActive workspace id (the workspace_tag create_workspace and list_workspaces return). Scopes the call and the handles it returns.

Output Schema

NameRequiredDescriptionDefault
bookYesWhich book was inverted: identity, chart_identity, name, reporting_currency and its counts, as verify_standard_document reports them.
engineYesStamped engine build/version identity for the tool result.
reportYesDownload descriptor for the inversion report.
statusYesinverted (every entry is documented or declared and every document can be submitted) or needs_information (unresolved_entries or withheld name what the batches do not carry).
withheldYesStatements left out of the batches because submit would refuse them: statement, reason (why, as submit words it: an incomplete identity or a violated document law), missing (the identity fields the book does not hold; empty when the reason is the law), entries (the journal entries they carry).
entry_routesYesJournal entries per route: registers, obligation, chart_residual (declared), unresolved.
finding_codesYesThe inversion's findings per code; each is in the report with its evidence.
report_handleYesMulti-read download:N handle naming the whole inversion: each entry's route and outputs, the documents' traces, and every finding.
workspace_tagYesWorkspace scoped by the tool call.
submit_batchesYesBatches of at most 100 register items, each {kind: handle, handle}; the chart is first.
document_countsYesSealed documents made: charts, statements (registers and obligations), itemizations (receipts and refunds), declarations.
unresolved_entriesYesJournal entry ids the documents do not carry.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

It goes significantly beyond annotations by detailing critical failure modes like 'unresolved_entries' and 'withheld' documents, specifying the output status is 'needs_information,' and describing the reporting mechanism.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely dense and verbose. While every sentence contains crucial information, the sheer length and technical density make it unwieldy for quick agent parsing.

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 the complexity of the domain and the legal/technical nature of the process, the description is exhaustive, covering input, process flow, failure handling, and output structure.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description provides vital semantic context to the inputs—differentiating between a 'handle' and an 'inline book' object—which is crucial for correct invocation.

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 specifies a unique and complex transformation: turning a compiled Standard Books document back into its constituent parts (charts, statements, invoices, etc.).

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 clearly defines input methods (handle or inline book) and provides strict operational constraints, such as only registering charts first and noting that nothing is registered or modeled in this process.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources