Skip to main content
Glama

Beancount.io

Delete Several Entry Sources

deleteEntrySources
Destructive

Delete several entries' source text in one commit; entries is a list of {entryHash or entry_hash, sha256sum} — the entry_hash listLedgerEntries returns under either spelling. The commit message is composed from the operation; there is no message argument. Returns the deleted count. A write that would add a bean-check error the ledger did not have — deleting an entry a balance assertion depends on, re-dating it past one — is refused with VALIDATION_FAILED naming each new error; pass allowInvalid: true to commit it anyway. dry_run previews without committing.

Input Schema

NameRequiredDescriptionDefault
dryRunNoAlias of dry_run, as REST and GraphQL spell it.
ledgerNoTarget ledger as owner/name. Required for an unpinned credential; defaults to the credential's ledger restriction.
dry_runNoRun every check and return the preview without committing
entriesYes
allowInvalidNoCommit even when the write would add bean-check errors (VALIDATION_FAILED with newLedgerErrors), instead of refusing it.
allow_invalidNoAlias of allowInvalid.

Output Schema

NameRequiredDescriptionDefault
okYes
errorNo
resultNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changed
    • addedInput schema / properties / allow_invalid
      Added value: +{
      +  "description": "Alias of allowInvalid.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / dryRun
      Added value: +{
      +  "description": "Alias of dry_run, as REST and GraphQL spell it.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / dry_run
      Added value: +{
      +  "description": "Run every check and return the preview without committing",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / entries / items / properties / entryHash / description
      Added value: +"The entry's hash."
    • addedInput schema / properties / entries / items / properties / entry_hash
      Added value: +{
      +  "description": "Alias of entryHash, as list output spells it.",
      +  "type": "string"
      +}
    • changedInput schema / properties / entries / items / required
      Previous value: -[
      -  "entryHash",
      -  "sha256sum"
      -]New value: +[
      +  "sha256sum"
      +]
    • addedOutput schema / properties / result / properties / dry_run
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / result / properties / preview
      Added value: +{
      +  "description": "Per-file affected text; populated on dry runs only.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "path": {
      +        "type": "string"
      +      },
      +      "text": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "path",
      +      "text"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / properties / result / required
      Previous value: -[
      -  "summary",
      -  "message",
      -  "deletedCount",
      -  "wrote",
      -  "entryHashes",
      -  "validation"
      -]New value: +[
      +  "summary",
      +  "message",
      +  "deletedCount",
      +  "preview",
      +  "dry_run",
      +  "wrote",
      +  "entryHashes",
      +  "validation"
      +]
  2. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Adds substantial behavior beyond the destructive annotation: commit-message composition, no message argument, deleted-count return, bean-check validation refusal with VALIDATION_FAILED and named errors, allowInvalid override, and dry_run preview. This tells the agent exactly how the write can fail and how to bypass the refusal.

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?

Dense but front-loaded with the core operation, and every sentence carries operational value. The long paragraph could be slightly easier to scan, but it is not padded.

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?

Complete for a destructive batch mutation with an output schema: it covers entry identity, commit behavior, validation refusal, override, preview, and return shape. The remaining schema details, such as ledger targeting and aliases, are handled by the schema.

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 already high, but the description adds useful semantics for entries: accepted hash spellings, sha256sum pairing, and the relationship to listLedgerEntries output. It also explains allowInvalid and dry_run behavior beyond schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: deleting several entries' source text in one commit. The batch nature is clear, but it does not explicitly distinguish itself from the singular deleteEntrySource sibling.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The batch context and dry_run preview imply when to use it, but there is no explicit guidance on choosing it over deleteEntrySource or updateEntrySource. Validation and allowInvalid behavior are explained, yet alternative-tool selection is left implicit.

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.