Skip to main content
Glama

Match log steps with diagram elements

map_log_activities
Idempotent

Maps event-log step names to BPMN diagram element IDs so you can align process execution data with the loaded diagram; unlisted steps keep their current match.

Instructions

Sets which diagram element each step of the loaded event log stands for. Keys are step names as returned by load_event_log; values are element ids from get_shapes, or null for a step that is not in the diagram. Steps not listed keep their current match. Returns the full matching.

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": {
      "mapping": "<mapping>"
    },
    "name": "map_log_activities"
  }
}

Input Schema

NameRequiredDescriptionDefault
mappingYesStep name → element id, or null

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.4.6

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly=false, idempotent=true, and destructive=false, and the description stays consistent with that while adding real value: the merge semantics for omitted steps and the fact that the full matching is returned. It does not discuss what happens when a value is an id that does not exist in the diagram, which is the one notable behavioral gap for a write tool.

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?

Three tight sentences, front-loaded with the verb and resource, then the key/value contract, then the merge rule and return value. No filler or restatement of the tool name.

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 single-parameter mutation with no output schema, the description covers the input contract, the partial-update behavior, and the return value, which is nearly everything an agent needs. The only shortfall is error/validation behavior for unknown element ids, which is left unstated.

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% and the schema already documents the mapping object and the null option, so the baseline would be 3. The description earns extra credit by specifying the provenance of both sides of the map (keys from load_event_log, ids from get_shapes) and by restating the null meaning in plain language.

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: sets the mapping from log step names to diagram element ids. It also names the two sibling tools that supply the inputs (load_event_log for keys, get_shapes for values), so an agent can tell exactly where the data comes from without opening another schema.

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?

Gives clear context for when this tool applies: after loading an event log and fetching shapes, to bind steps to diagram elements. The rule that unlisted steps keep their current match tells the agent this is an incremental patch rather than a full replacement, which shapes how it should build the call. There is no explicit exclusion or named alternative, but no obvious competing tool exists for this operation.

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