Skip to main content
Glama

saet_antal_i_kurv

Idempotent

Set the quantity of one or more items in an online shopping basket, where a quantity of 0 removes the item. Changes affect only the basket, not orders or payments.

Instructions

Sæt antal af varer i kurven: {"varenummer": antal}. Antallet er det samlede antal (ikke et tillæg), og 0 fjerner varen. Ændrer KUN kurven. Spørg brugeren først.

Input Schema

NameRequiredDescriptionDefault
antalYes
butikYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare mutation, idempotency and non-destructiveness; the description adds the crucial semantics that the number is a total rather than an increment (explaining the idempotentHint) and that 0 removes the line. 'Ændrer KUN kurven' is valuable scoping — it reassures the agent that no order is placed — though it does not say what happens when the item number is invalid or the cart is empty.

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?

Four short clauses, all load-bearing, with the operation and format front-loaded before the behavioral caveats. The inline JSON fragment is slightly awkward inside a sentence but conveys the expected input compactly.

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 write tool with a nested-object parameter and no output schema, the definition covers the key semantics but leaves the required 'butik' parameter and the failure/return behavior unexplained. An agent could invoke it on a simple path but would be guessing about the store argument.

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 0%, so the description must carry all parameter meaning. It does explain the nested map parameter well (key = varenummer, value = total quantity, 0 = removal), but the required 'butik' parameter is never mentioned anywhere, leaving one of two parameters completely undefined.

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?

Names a specific verb and resource ('Sæt antal af varer i kurven') and even shows the expected shape, {"varenummer": antal}, so the operation is unambiguous. It stops short of naming or contrasting any sibling (e.g. vis_kurv for reading the basket), so differentiation is left to the reader.

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?

'Spørg brugeren først' gives one concrete precondition for invoking the tool, which is genuinely useful for an agent acting on a shared cart. However, there is no guidance on when this tool is preferable to alternatives such as vis_kurv or soeg_varer, and no statement of when not to use it.

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