Skip to main content
Glama

Purchase / sales documents

saga_documents
Read-onlyIdempotent

Retrieve purchase or sales documents for a date range with totals, optionally filtering foreign-currency records kept separately by SAGA.

Instructions

Purchase (intrari) or sales (iesiri) documents in a period with totals. currency=true lists the foreign-currency ones instead (SAGA keeps them apart: purchases in INTRD, sales in EXPORT).

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>",
      "date_from": "<date_from>",
      "date_to": "<date_to>"
    },
    "name": "saga_documents"
  }
}

Input Schema

NameRequiredDescriptionDefault
firmNoFirm code (folder name such as "0001"). Optional when only one firm is configured.
kindYes
limitNoMaximum rows to return.
numberNo
offsetNoRows to skip (for paging).
date_toYesEnd date, YYYY-MM-DD (inclusive).
currencyNotrue = foreign-currency documents.
date_fromYesStart date, YYYY-MM-DD (inclusive).
partner_codeNo
only_unpostedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.7/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 lookup. The description adds useful behavioral context beyond that: currency=true switches to a separate foreign-currency dataset, SAGA stores purchases and sales in different tables, and results include totals. It does not discuss ordering or pagination behavior.

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?

The definition is two compact sentences with the core purpose front-loaded. The parenthetical Romanian terms and SAGA table names add useful specificity without unnecessary wording.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 10-parameter read-only list tool with no output schema, the description covers the core mode, period scope, and that totals are returned. It leaves several optional filters and output/pagination expectations unexplained, so it is sufficient for basic invocation but not fully complete.

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?

With 60% schema description coverage, the schema already documents most parameters. The description adds meaning for kind and currency, including the important 'instead' behavior and table separation, but it does not clarify number, partner_code, or only_unposted, leaving meaningful gaps for a 10-parameter tool.

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 the resource as purchase or sales documents over a date period with totals, and distinguishes purchases from sales by kind. It does not explicitly contrast itself with the singular saga_document sibling, and the list/query verb is only implied.

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?

It gives a conditional usage mode: currency=true returns foreign-currency documents instead of the normal set. However, it does not state when to use this tool versus related siblings such as saga_document or saga_open_invoices, nor does it mention prerequisites or exclusions.

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