Skip to main content
Glama

Förbered bilaga

prepare_bilaga
Idempotent

Markera en bilaga som FÖRBEREDD (motsvarar knappen Förbered i appen). Kan ALDRIG attestera; attesten, som markerar att avstämningen är granskad och klar, görs i appen. Nekas om avstämt belopp saknas eller om differensen överstiger väsentlighetsgränsen (se can_prepare och prepare_blocker i get_reconciliation). Ett upprepat anrop mot oförändrat underlag ändrar inget. Kräver att nyckeln har behörigheten 'reconcile'. Argument: orgnr, bilaga_type (BANK/AR_CONTROL/AP_CONTROL/VAT/AGI/TAX_ACCOUNT/ASSET/GL_ACCOUNT), account (0 för aggregat som moms), year, month.

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": {
      "orgnr": "<orgnr>",
      "bilaga_type": "<bilaga_type>",
      "account": "<account>",
      "year": "<year>",
      "month": "<month>"
    },
    "name": "prepare_bilaga"
  }
}

Input Schema

NameRequiredDescriptionDefault
yearYes
monthYes
orgnrYesBolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.
accountYes
bilaga_typeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / orgnr / description
      Added value: +"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies."
  2. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Adds substantial context beyond annotations: denial conditions (missing reconciled amount or difference above the materiality limit), the 'reconcile' permission requirement, and the fact that a repeated call against unchanged data changes nothing. Annotations only cover the safety profile, so this disclosure is genuinely valuable.

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 – the core action and the attestation boundary come first, then denial rules, idempotency, permission, and parameters. Every sentence carries information; only the trailing argument list partially duplicates the schema.

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 mutation tool with rich annotations, the description covers preconditions, permissions, denial reasons, and idempotency. Without an output schema it doesn't describe the success response shape, which is the remaining small gap.

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 only 20% (only orgnr documented), and the description compensates well: it enumerates the bilaga_type values, which the schema lacks as an enum, and explains that account=0 is used for aggregates such as VAT. Year and month are left unstated but are self-explanatory.

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 ('Markera en bilaga som FÖRBEREDD') and explicitly delimits it from attestation ('Kan ALDRIG attestera'), so an agent can tell it apart from approval-type operations. It doesn't name the sibling revert_prepare_bilaga as the inverse, which is the one missing piece for full sibling differentiation.

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?

Gives clear when-to-use context (corresponds to the Förbered button), states when-not (never attests, that is done in the app), and routes the agent to can_prepare/prepare_blocker in get_reconciliation for preconditions. It stops short of naming the undo tool for reversing the action.

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.