Skip to main content
Glama

Spara anställd

upsert_employee
Idempotent

Skapa eller uppdatera en anställd. Utan employee_id skapas en ny (personnummer krävs då); med employee_id uppdateras den och BARA medskickade fält ändras (personnummer behövs inte). Scope payroll. Argument: orgnr; valfritt employee_id, personnummer, first_name, last_name, tax_table, tax_column, monthly_salary_ore, employer_fee_bps, bank_account, active, note. Timanställda: hourly_rate_ore (timlön), overtime_rate_ore (ersättning per övertidstimme), ob_rate_ore (OB-tillägg per timme) och vacation_pay_bps (semesterersättning som betalas med varje lön, 1200 = 12 %); de används av get_payroll_time_basis.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNo
orgnrYesBolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.
activeNo
last_nameNo
tax_tableNo
first_nameNo
tax_columnNo
employee_idNo
ob_rate_oreNo
bank_accountNo
personnummerNo
hourly_rate_oreNo
employer_fee_bpsNo
vacation_pay_bpsNo
overtime_rate_oreNo
monthly_salary_oreNo

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.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, destructiveHint=false, so the safety profile is covered. The description adds genuinely useful behavior beyond them: partial-update semantics ('BARA medskickade fält ändras' — unspecified fields are left untouched), a conditional required field, and the payroll scope gate. It does not mention failure behavior or auth/permission detail beyond scope.

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?

Front-loaded with the upsert decision rule, then the scope, then the argument glossary. The raw argument list repeats schema property names, which is mildly redundant, but it is compact for a 16-parameter tool and every clause adds either a condition or a unit meaning.

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 16-parameter mutation with no output schema and near-zero schema documentation, the description covers the create/update branch, the conditionally required field, the partial-update rule, scope, and the special unit conventions. What is missing (return value, tax table meaning, error behavior) is secondary for correct invocation.

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 description coverage is only 6%, so the description carries nearly the whole burden, and it largely does: it enumerates all 16 arguments and, critically, explains the time-employee fields (hourly_rate_ore, overtime_rate_ore, ob_rate_ore, vacation_pay_bps) including the non-obvious scale convention '1200 = 12 %'. It leaves tax_table/tax_column, employer_fee_bps units, and employee_id format unexplained.

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 and resource ('Skapa eller uppdatera en anställd') and immediately disambiguates against the plain create/update siblings by explaining the upsert key logic. An agent can tell this apart from delete_employee, list_employees or calc_payroll without opening the schema.

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 explicit conditional routing: no employee_id ⇒ create (personnummer required), with employee_id ⇒ update (personnummer not needed). It also names the consuming sibling get_payroll_time_basis for the hourly-rate fields. It stops short of stating when NOT to use it (e.g. bulk import or payroll runs), so it is strong but not fully exhaustive.

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