Skip to main content
Glama

One document with lines

saga_document
Read-onlyIdempotent

Retrieves a single purchase or sales document, including header, lines, generated ledger entries, and linked payments, so you can inspect its full accounting impact.

Instructions

One purchase or sales document: header, lines, the ledger entries it produced and the payments linked to it.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "kind": "<kind>",
      "id": "<id>"
    },
    "name": "saga_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesDocument id (ID_INTRARE / ID_IESIRE) from saga_documents or saga_open_invoices.
firmNoFirm code (folder name such as "0001"). Optional when only one firm is configured.
kindYes
currencyNotrue = a foreign-currency document; when omitted, both kinds are searched.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already establish that this is a read-only, idempotent, non-destructive, closed-world operation. The description adds useful behavioral context by stating that the result includes the document header, lines, generated ledger entries, and linked payments; with no output schema, this scope information is valuable.

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

Conciseness5/5

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

It is a single, front-loaded sentence that wastes no words. The core resource and returned components are stated immediately.

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?

For a read-only single-document getter with no output schema, the description gives enough return-scope information to set expectations: header, lines, ledger entries, and payments. It leaves required parameters and lookup mechanics to the schema, which is reasonable given the 75% schema coverage.

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?

Schema description coverage is 75%, with most parameters documented in the schema, so the schema does the heavy lifting. The description's 'purchase or sales' wording aligns with the kind enum but does not add detailed meaning for id, firm, or currency.

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?

The description clearly identifies a specific resource: 'One purchase or sales document,' and enumerates its major components (header, lines, ledger entries, payments). The singular 'One' implicitly differentiates it from document-list siblings, though it does not explicitly name an alternative tool.

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

Usage Guidelines2/5

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

The description offers no explicit when-to-use guidance, prerequisites, or comparison with alternatives such as saga_documents or saga_open_invoices. Retrieval of a single known document is implied, but the agent is not told when to choose this tool versus a list/search tool.

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