Skip to main content
Glama

models-add_definition

models-add_definition

Add a plan item definition to a draft model, with options for nesting inside stages, sentry guards and sources, or event listeners triggered by sentries.

Instructions

Adds a plan item definition to a draft model. Use parent_definition_id to nest items inside stages. For sentries, use guards_definition_id and source_definition_id. For event listeners, use triggers_sentry_definition_id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
definition_typeYesType: task, stage, milestone, event_listener, sentry, process_definition
discretionaryNoIs this a discretionary item?
guards_definition_idNoFor sentry definitions: the definition ID this sentry guards. Sets guards_item on instantiation.
manual_activation_ruleNoExpression/description for manual activation
model_idYesModel ID (@rid format)
nameYesDefinition name
parent_definition_idNoParent definition ID (stage) for nesting. Creates ParentOf edge on instantiation.
process_definition_definition_idNoFor task definitions: the process_definition definition ID to execute. Sets process_definition_id on instantiation.
repetition_ruleNoExpression/description for repetition
required_ruleNoExpression/description for required determination
sequence_orderNoSuggested order within container
source_definition_idNoFor sentry definitions: the definition ID that triggers this sentry. Sets source_ref on instantiation.
template_dataNoType-specific template data (e.g., task fields, sentry fields, event listener fields)
triggers_sentry_definition_idNoFor event_listener definitions: the sentry definition ID to trigger when event fires. Sets triggers_sentry on instantiation.
Behavior2/5

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

No annotations are provided, so the description carries full burden. It only mentions 'Adds... to a draft model', implying modification but not disclosing permissions, reversibility, or side effects. It does not elaborate on what happens on instantiation beyond hints in parameter descriptions (which are not in the main description).

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

Conciseness5/5

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

The description is two sentences long with no unnecessary words. It front-loads the core purpose and then provides targeted relational guidance. Every sentence adds value without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite 14 parameters, no output schema, and no annotations, the description omits critical context: return value (likely the created definition's ID), preconditions (model must be a draft), error conditions, and permissions. The concise style leaves significant gaps for safe 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 coverage is 100% with individual parameter descriptions, but the description adds group-level semantics by explaining relationships: e.g., parent_definition_id for nesting, guards_definition_id and source_definition_id for sentries, triggers_sentry_definition_id for event listeners. This contextual grouping provides additional meaning beyond isolated schema comments.

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?

The description clearly states the verb 'Adds' and the resource 'plan item definition to a draft model'. It distinguishes from sibling tools like models-update_definition and models-delete_definition by focusing on addition. The conditional guidance for nesting and sentry/event listener types adds specificity.

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?

The description gives explicit guidance on when to use parent_definition_id for nesting, and for sentries and event listeners which parameters to use. However, it does not specify when not to use this tool or compare to alternatives like cmmn-create_task (runtime addition). It lacks exclusions or context about model state (draft required).

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mstang/casemgr-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server