Skip to main content
Glama

Save Action Definition

onto_actiondef_save
DestructiveIdempotent

Actiondef anlegen/aendern (Button am Objekt). PFLICHT: body.scopes mit den Scope-IDs, an denen der Button erscheinen soll — du musst dort Manager (can_manage_scope) oder Schreiber (can_write) sein, sonst 403. PUBLIC (15) nur fuer Admins. Beispiel fuer 'Formular am Standort ausfuellen': body = {"object_types":["building"],"scopes":[7],"roles":["member"],"action":{"type":"form_answer","name":"Visite","form":""}}. action.type 'form_answer' oeffnet das Formular und verknuepft die Antwort mit dem Objekt. Actions sind SCOPE-Daten, nicht global. Sehen darf sie, wer einen der Scopes in body.scopes[] lesen darf; AUSFUEHREN nur, wenn das Scope des Objekts in body.scopes[] steht (oder die Def public:true traegt). Ein Mitglied mit can_manage_scope auf SEINEM Scope darf dort eigene Actions anlegen (Kopie der Plattform-Action mit body.scopes=[eigener Scope]) und so die Standard-Actions im eigenen Scope nutzbar machen. Beim Anlegen genau EIN Ziel-Scope. public:true und der PUBLIC-Scope 15 sind Administratoren vorbehalten, SQL-Bedingungen ebenfalls. Ein Scope-Manager kann Actions in seinem Scope per hidden_actions abschalten. | EN: action, button, definition, gate, condition, rule action.result_scope_id (Ergebnis-Scope): bei 'create'/'form_answer' bestimmt er, WO das neue Objekt entsteht. Bei 'update' ist er die BRUECKE: die Aktion darf ein BESTEHENDES Objekt in diesem Scope fortschreiben, auch wenn der Ausfuehrende dort NUR Leserecht hat — schreibbar sind genau die Eigenschaften aus action.props, nur am Zielobjekt der Aktion; danach ist die Bruecke zu (andere Felder 403). Pflicht: Personenbindung ({current_user_email}, {current_profile_id}, {current_user_id}, {user_email} oder {user_person}); bei 'update' zusaetzlich action.props, sonst 400. Merksatz: ein Mitarbeiter braucht KEIN Schreibrecht im Planungs-Scope — Aktion im Planungs-Scope definieren, result_scope_id setzen, Eigenschaften in action.props auflisten. Beispiel Einstempeln: object_types [shift], scopes [80,81], guards [{type: linked_to_user, linktype: worksShift, message: 'Nur die eigene Schicht'}], action {type: update, result_scope_id: 80, props: {actualStart: '{now}', stempelStatus: 'eingestempelt', istGeaendertVon: '{user_email}'}}. guards pruefen VOR dem Ausfuehren und rein lesend: 'linked_to_user' verlangt, dass das Zielobjekt ueber diesen Linktyp mit der handelnden Person verknuepft ist (Richtung egal), sonst 403 mit der eigenen message. Fuer 'nur die eigene Schicht' NIEMALS links.require 'present' nehmen — require ist eine Pruefung, kein Auftrag.

Input Schema

NameRequiredDescriptionDefault
keyYesTechnischer Schluessel (a-zA-Z0-9_), z.B. pflege_visite
bodyYesActiondef-JSON als STRING, z.B. {"object_types":["building"],"scopes":[7],"action":{"type":"form_answer","form":"<udid>"}}
labelYesAnzeigetext des Buttons
descriptionNoBeschreibung (optional)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare destructive/idempotent/non-read-only, but the description adds substantial behavioral context beyond them: authorization failure modes (403 with guard message, 400 without person binding), scope-based visibility vs execution distinction, the result_scope_id 'bridge' that lets a read-only user write a restricted property set, hidden_actions suppression by scope managers, and the warning that two scopes must exist to reach the write scope. This is exactly the kind of non-obvious behavior annotations cannot express.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The essential requirements are front-loaded and most sentences carry unique information, but the text is very long, mixes German and English, and contains a garbled keyword fragment ("| EN: action, button, definition, gate, condition, rule action.result_scope_id") that runs into the next idea and is hard to parse. The 'MerkSATZ' and two full examples push length well past what a scanning agent needs.

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 complex, permission-gated mutation with no output schema, the description covers nearly everything an agent needs: required body fields, scope rights, admin-only flags, guards, result_scope_id, and worked examples. Minor gaps remain — it does not say whether an existing definition with the same key is overwritten or whether key is immutable, which matters for an upsert-style save.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and already documents key/label/body, yet the description still adds real meaning: body.scopes is mandatory, exactly one target scope at creation, public:true restricted to admins, action.type 'form_answer' semantics, required person binding placeholders, and the 'update' case requiring action.props. It supplies two concrete body examples that the schema's single truncated example does not cover.

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?

The description opens with a specific verb+resource phrase: "Actiondef anlegen/aendern (Button am Objekt)", which tells an agent it creates/updates an action definition that renders as a button on objects. It never names its siblings (onto_actiondef_list, onto_actiondef_delete), so the create/update vs list/delete distinction is implied by the verb rather than stated.

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?

It states the hard precondition clearly (body.scopes with the scope IDs is PFLICHT, caller must be can_manage_scope or can_write there, otherwise 403) and gives an explicit exclusion (PUBLIC scope 15 and public:true are admin-only). It also explains a legitimate alternative usage path (a scope manager copying a platform action into their own scope). What it lacks is explicit routing to sibling tools for the adjacent operations.

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.