Skip to main content
Glama

Ändra instruktion

update_instruction
DestructiveIdempotent

Ändrar en sparad instruktion: ny text och/eller vilka bolag den gäller. Använd när användaren ber dig ändra eller rätta en regel. Den gamla texten skrivs över. Argument: instruction_id (från list_instructions); valfritt text, orgnr för att låta den gälla ett bolag och all_companies=true för att låta den gälla alla bolag. Returnerar instruktionen som den ser ut efter ändringen. Kräver behörigheten manage_documents i bolaget; instruktioner för alla bolag ändras bara av kontots administratör.

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": {
      "instruction_id": "<instruction_id>"
    },
    "name": "update_instruction"
  }
}

Input Schema

NameRequiredDescriptionDefault
textNoValfritt: ny text, högst 2000 tecken. Utelämna för att behålla texten.
orgnrNoValfritt: låt instruktionen gälla bara det här bolaget, t.ex. 559900-1004.
all_companiesNotrue för att låta instruktionen gälla alla bolag i kontot.
instruction_idYesInstruktionens id från list_instructions.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior5/5

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

Goes well past the annotations: it warns that the old text is overwritten, states the return value (the instruction as it looks after the change), and names the required permission (manage_documents in the company) plus an escalated restriction (all-companies instructions only by account admin). These are exactly the facts an agent needs before committing a destructive, idempotent write.

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 action and the overwrite warning, then arguments, then permissions. Dense but every clause carries information; only the parameter recap slightly 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?

Covers purpose, trigger, return value and authorization for a 4-parameter mutation with no output schema. The remaining gap is the interaction between orgnr and all_companies (mutual exclusivity, and the no-op case when both are omitted).

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 coverage is 100% and the schema descriptions already explain text length, orgnr format and all_companies semantics. The description mostly restates these at a business level, adding only that instruction_id comes from list_instructions; it doesn't resolve what happens when both orgnr and all_companies are omitted. Baseline 3 is appropriate.

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 ("Ändrar en sparad instruktion") plus the mutable aspects (text och/eller vilka bolag den gäller). Deletion and creation siblings exist but aren't named, so sibling differentiation is implied by the verb rather than explicit.

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?

"Använd när användaren ber dig ändra eller rätta en regel" gives a clear trigger condition. No exclusions or named alternatives (add_instruction, delete_instruction, list_instructions as a prerequisite lookup) are spelled out beyond the id source.

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