Skip to main content
Glama

Skapa eller ändra konto

upsert_account
Idempotent

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.

Input Schema

TableJSON 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), t.ex. 6540.
vat_codeNoValfritt: kontots momskod.

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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."
  2. 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."
  3. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare non-readOnly, idempotent, non-destructive, but the description goes well beyond them: it discloses the side effect (the change applies to the account going forward, existing voucher amounts are untouched), the required authorization ('book' permission), and the return contents. That is exactly the extra behavioral context annotations cannot convey.

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?

Five short sentences, each carrying distinct payload (purpose, trigger, prerequisite, return, side effect, permission) and front-loaded with the core action. Slightly dense but there is no filler or repetition.

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?

Despite there being no output schema, the description states what is returned (ok plus the account number). Combined with the permission requirement, the stated side effects, and the look-up prerequisite, an agent has everything needed to invoke this mutation safely.

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 100%, with each of the six parameters documented including formats and examples, so the baseline is 3. The description names which fields are updatable (name, type, SRU, VAT) but adds no syntax, defaults, or constraints beyond what the schema already provides.

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?

The description states a precise verb+resource pair (creates or modifies an account in the company's chart of accounts) and enumerates the fields it can touch: name, account type, SRU code and VAT code. This resolves the ambiguous 'upsert' name and lets an agent distinguish it from list_accounts and other company-edit tools.

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?

It gives an explicit trigger ('when an account needed for a booking is missing or has incorrect data') and names the required prerequisite/alternative action: look up the chart of accounts first with list_accounts. Both when-to-use and the ordering dependency are spelled out, 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.

Resources