Skip to main content
Glama

Skapa eller ändra konto

upsert_account
DestructiveIdempotent

Skapar ett konto i bolagets kontoplan eller ändrar namn, kontotyp, SRU-kod och momskod på ett befintligt konto. Använd när ett konto som behövs för en bokning saknas eller har fel uppgifter; slå först upp kontoplanen med list_accounts. Returnerar ok och kontonumret. Bieffekt: ändringen gäller kontot framöver; inga belopp i befintliga verifikat ändras. Kräver behörigheten book.

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>",
      "number": "<number>",
      "name": "<name>",
      "type": "<type>"
    },
    "name": "upsert_account"
  }
}

Input Schema

NameRequiredDescriptionDefault
sruNoValfritt: SRU-kod som kontot summeras på i deklarationen.
nameYesKontots namn, t.ex. IT-tjänster.
typeYesKontotyp: T (tillgång), S (skuld eller eget kapital), I (intäkt) eller K (kostnad).
orgnrYesBolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.
numberYesKontonummer i BAS-kontoplanen, minst fyrsiffrigt (1000 eller högre) och i klass 1 till 8, t.ex. 6540.
vat_codeNoValfritt: kontots momskod.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / number / description
      Previous value: -"Kontonummer i BAS-kontoplanen, minst fyrsiffrigt (1000 eller högre), t.ex. 6540."New value: +"Kontonummer i BAS-kontoplanen, minst fyrsiffrigt (1000 eller högre) och i klass 1 till 8, t.ex. 6540."
  2. Changed5 schema fields changed
    • addedInput schema / properties / name / description
      Added value: +"Kontots namn, t.ex. IT-tjänster."
    • addedInput schema / properties / number / description
      Added value: +"Kontonummer i BAS-kontoplanen, minst fyrsiffrigt (1000 eller högre), t.ex. 6540."
    • addedInput schema / properties / sru / description
      Added value: +"Valfritt: SRU-kod som kontot summeras på i deklarationen."
    • addedInput schema / properties / type / description
      Added value: +"Kontotyp: T (tillgång), S (skuld eller eget kapital), I (intäkt) eller K (kostnad)."
    • addedInput schema / properties / vat_code / description
      Added value: +"Valfritt: kontots momskod."
  3. 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."
  4. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Goes well past the annotations by explaining the nature of the destructiveHint: the change applies prospectively and no amounts in existing vouchers are altered. It also names the required permission ("book") and the return value (ok plus the account number), which an agent cannot derive from the structured fields.

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?

Four tight sentences, each carrying distinct information: what it does, when to use it plus the prerequisite, the return value, and the side effect plus permission. The trigger condition is front-loaded right after the purpose statement.

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?

No output schema exists, yet the description supplies both the return shape (ok and account number) and the mutation's blast radius, plus the authorization requirement. For an idempotent upsert with six fully documented parameters, nothing an agent needs to call it correctly is missing.

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 100%, so the baseline is 3, but the description adds the upsert semantics — that an existing account is matched and its name/type/SRU/VAT fields are the ones modified. It does not clarify the match key (orgnr plus number) explicitly, which is the one remaining semantic gap.

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?

States a specific verb pair (create/change) plus the resource (account in the company chart of accounts) and enumerates the mutable fields (name, account type, SRU code, VAT code). It also names the sibling list_accounts as the lookup step, so an agent can distinguish it from read-only account tools without opening schemas.

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?

Explicit trigger condition: use it when an account needed for a booking is missing or carries wrong data. It also prescribes the prerequisite sequence (look up the chart of accounts with list_accounts first), leaving nothing to inference.

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.