Skip to main content
Glama

onto_function_create

RECHENREGEL anlegen: eine Function. Anders als ein Trigger hat sie EINGABEN und einen AUSDRUCK — sie rechnet, statt nur zu reagieren. "inputs": Liste von {key, type, required}; Typen: object, string, int, float, bool, datetime, list. "body": der Ausdruck. body-Format: {"inputs":[{"key":"kmStand","type":"int","required":true}],"body":{"if":[{">":[{"field":["kmStand"]},{"field":["letzterService"]}]},"faellig","ok"]},"effects":[]}. Der Ausdruck AST hat IMMER die Form {"operator":[argumente]} — also {"-":[a,b]} fuer a minus b, nicht {"op":...}. Operatoren u.a.: field/var, source, link, linklist, and/or/!/if, ==/!=/</<=/>/>=/in/notin/empty/notempty/matches, +/-/*///%/min/max/abs/round, cat/lower/upper/len/trim, count_of/sum_of/max_of/min_of. Kein eval — nur diese Operatoren. Das Ergebnis steht als {result} bereit und wird in Regeln per run_function genutzt. Optional "effects" (set_property/create_object/create_link). RECHTE: scope_id muss ein Scope sein, den du VERWALTEST (can_manage_scope=1). | EN: function, automation, expression, script, effect

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyNoTechnischer Schluessel (a-zA-Z0-9_). Ohne Angabe = name.
bodyYesDie Definition als Objekt oder JSON-String. body-Format: {"inputs":[{"key":"kmStand","type":"int","required":true}],"body":{"if":[{">":[{"field":["kmStand"]},{"field":["letzterService"]}]},"faellig","ok"]},"effects":[]}. Der Ausdruck AST hat IMMER die Form {"operator":[argumente]} — also {"-":[a,b]} fuer a minus b, nicht {"op":...}. Operatoren u.a.: field/var, source, link, linklist, and/or/!/if, ==/!=/</<=/>/>=/in/notin/empty/notempty/matches, +/-/*///%/min/max/abs/round, cat/lower/upper/len/trim, count_of/sum_of/max_of/min_of. Kein eval — nur diese Operatoren. Das Ergebnis steht als {result} bereit und wird in Regeln per run_function genutzt.
nameYesAnzeigename (z.B. 'Wartung faellig?')
labelNoAnzeigetext
scope_idYesZiel-Scope. Du musst dort Manager sein (can_manage_scope).
descriptionNoBeschreibung (optional)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations declare the basic safety profile (not read-only, not destructive, not idempotent). The description adds meaningful behavioral context beyond that: the permission requirement (scope_id must be a managed scope), the optional effects that can mutate data, and the security constraint that no eval is used and only listed operators are available. It does not cover rate limits or error behavior, but the additions are substantive.

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 description is front-loaded with purpose and then moves through inputs, body format, operators, effects, and permissions. However, it duplicates a large portion of the body format and operator details that already appear in the schema description, making it longer than necessary for a 1-sentence tool purpose.

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?

For a complex mutation tool with nested objects and no output schema, the description covers everything an agent needs: creation semantics, permission prerequisites, the full expression AST format, allowed operators, optional effects, and how the result is consumed. Nothing critical is missing.

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 coverage is 100%, so the schema already documents most parameters, including the body format and operator list. The description adds an explicit enumeration of allowed input types (object, string, int, float, bool, datetime, list) that is not in the schema, which is useful extra meaning for the complex nested 'body' parameter.

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 and resource ('RECHENREGEL anlegen: eine Function') and explicitly distinguishes it from a trigger by noting it has inputs and an expression. An agent can identify the tool's role without opening other schemas.

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?

Clearly frames the tool as creating a calculation rule rather than a trigger, and notes that the result is used in rules via run_function. However, it gives no explicit guidance on when to use this versus onto_function_update or onto_function_run, so the alternative routing is only implied.

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.