Skip to main content
Glama

BotSpot: AI Trading, Backtests and Bots

Record external wait in visible plan

record_external_wait_in_plan
DestructiveIdempotent

Generic factual plan helper for the moment after a domain tool starts asynchronous work and returns a real externalWaitId. Identity and revision come from that stored hook wait; pass externalWaitId instead of copying externalKind, externalId, revisionId, or sourceExternalId. Legacy identity fields are optional assertions and must match the stored record. It turns waitingItemTarget into the waiting row. With an explicit currentItemTarget and no waitingItemTarget or waitingItem, that current unfinished item becomes the waiting row. When both targets name the same unfinished item, that item waits without claiming completion. Otherwise it completes the current launch step, reusing that row's label and completion criteria when waitingItem is omitted, or appends one waiting row only when that future work is not already visible. Both targets are selector objects with type=id/itemId or type=position/position, never bare UUID strings. A current retry or validation row awaiting its own external result must be the waiting target too; do not attach the new wait to a completed parent or an earlier failed attempt. Use the latest returned activePlan IDs/order. waitingItemTarget may identify the same unfinished current row or a later row; omit it when waitingItem defines a new row. If both targets accidentally identify the current row and a complete waitingItem is supplied, the helper safely appends that new row after the current item. It carries the returned facts without matching or interpreting item labels. It does not start, stop, retry, interpret, or otherwise change external work. Do not call it when the domain tool failed or returned no externalWaitId.

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": {
      "externalWaitId": "<externalWaitId>"
    },
    "name": "record_external_wait_in_plan"
  }
}

Input Schema

NameRequiredDescriptionDefault
planIdNoOptional plan UUID. In the current conversation, omit planId unless you already have the actual plan id from get_active_plan or a wake message. Never pass a plan item id here; target plan items through target.itemId or target.position.
evidenceNo
externalIdNoOptional assertion against the stored hook identity. Prefer externalWaitId alone.
revisionIdNo
waitingItemNoWaiting-row fields for a newly inserted row or intentional overrides for a distinct existing waitingItemTarget. When this defines a new row, omit waitingItemTarget. Omit waitingItem when waitingItemTarget already identifies the complete future row.
externalKindNoOptional assertion against the stored hook identity. Prefer externalWaitId alone.
conversationIdNoOptional conversation UUID. Omit this field to use the current MCP conversation context; never pass placeholders such as `current`.
externalWaitIdYesThe durable external wait id returned by the same domain-tool result.
sourceExternalIdNo
currentItemTargetNoA structured target object, never a bare UUID or number. Use {"type":"id","itemId":"<actual item UUID returned by get_active_plan>"} or {"type":"position","position":3}. This identifies the visible plan item advanced by the domain tool. Omit to use the current actionable item. After adding a retry row, use that current retry row, not its completed parent.
waitingItemTargetNoA structured target object, never a bare UUID or number. Use {"type":"id","itemId":"<actual item UUID returned by get_active_plan>"} or {"type":"position","position":3}. The unfinished item whose completion requires this external result. Omit this selector and waitingItem to reuse an explicitly selected unfinished currentItemTarget as the waiting row. For a current retry/validation row, target that same unfinished row; do not target its completed parent or a previous failed attempt. Otherwise choose a later visible row when the current launch step is complete. Read IDs and order from the latest returned activePlan. Omit when waitingItem defines a new row.
currentItemOutcomeNo
currentItemEvidenceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / currentItemTarget / description
      Previous value: -"Selector object for the visible item advanced by the domain tool: {\"type\":\"id\",\"itemId\":\"<visible item UUID>\"} or {\"type\":\"position\",\"position\":3}. Omit to use the current actionable item. After adding a retry row, use that current retry row, not its completed parent."New value: +"A structured target object, never a bare UUID or number. Use {\"type\":\"id\",\"itemId\":\"<actual item UUID returned by get_active_plan>\"} or {\"type\":\"position\",\"position\":3}. This identifies the visible plan item advanced by the domain tool. Omit to use the current actionable item. After adding a retry row, use that current retry row, not its completed parent."
    • changedInput schema / properties / waitingItemTarget / description
      Previous value: -"Selector OBJECT for the unfinished item whose completion requires this external result, never a bare UUID string. Use {\"type\":\"id\",\"itemId\":\"<visible item UUID>\"} or {\"type\":\"position\",\"position\":3}. Omit this selector and waitingItem to reuse an explicitly selected unfinished currentItemTarget as the waiting row. For a current retry/validation row, target that same unfinished row; do not target its completed parent or a previous failed attempt. Otherwise choose a later visible row. Read IDs and order from the latest returned activePlan. Omit when waitingItem defines a new row."New value: +"A structured target object, never a bare UUID or number. Use {\"type\":\"id\",\"itemId\":\"<actual item UUID returned by get_active_plan>\"} or {\"type\":\"position\",\"position\":3}. The unfinished item whose completion requires this external result. Omit this selector and waitingItem to reuse an explicitly selected unfinished currentItemTarget as the waiting row. For a current retry/validation row, target that same unfinished row; do not target its completed parent or a previous failed attempt. Otherwise choose a later visible row when the current launch step is complete. Read IDs and order from the latest returned activePlan. Omit when waitingItem defines a new row."
  2. Changed2 schema fields changed
    • changedInput schema / properties / currentItemTarget / description
      Previous value: -"The visible plan item advanced by the domain tool. Omit to use the current actionable item."New value: +"Selector object for the visible item advanced by the domain tool: {\"type\":\"id\",\"itemId\":\"<visible item UUID>\"} or {\"type\":\"position\",\"position\":3}. Omit to use the current actionable item. After adding a retry row, use that current retry row, not its completed parent."
    • changedInput schema / properties / waitingItemTarget / description
      Previous value: -"An already-visible future plan item that should become the waiting row. It must be strictly after currentItemTarget and must not identify the same item. Omit it when waitingItem defines a new row to insert."New value: +"Selector OBJECT for the unfinished item whose completion requires this external result, never a bare UUID string. Use {\"type\":\"id\",\"itemId\":\"<visible item UUID>\"} or {\"type\":\"position\",\"position\":3}. Omit this selector and waitingItem to reuse an explicitly selected unfinished currentItemTarget as the waiting row. For a current retry/validation row, target that same unfinished row; do not target its completed parent or a previous failed attempt. Otherwise choose a later visible row. Read IDs and order from the latest returned activePlan. Omit when waitingItem defines a new row."
  3. First observed

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=true, and openWorldHint=true, so the safety profile is largely covered. The description adds genuinely useful behavior: it may complete the current launch step, reuse that row's label and completion criteria, and only appends a waiting row when future work is not already visible. It does not explicitly state that completing the current row is an irreversible mutation, which is the main gap given destructiveHint is set.

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 purpose is front-loaded, and most sentences encode a distinct branching rule, which is defensible for a 13-parameter tool with nested selectors. However, it is one unbroken block of dense conditionals with repeated statements of the selector shape already present in the schema, and phrases like 'carries the returned facts without matching or interpreting item labels' are vague. Structuring the branch cases would materially improve it.

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, branching mutation tool the description covers the decision procedure, the exclusion case, and the retry/validation-row edge case, which is close to what an agent needs to call it correctly. There is no output schema, and the description never says what the call returns (created vs reused row, updated plan state), which is the remaining gap.

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?

With 62% schema coverage and 13 parameters, the description contributes real meaning: identity and revision derive from externalWaitId rather than copied fields, legacy identity fields are only assertions that must match, and both target params are selector objects rather than bare UUIDs. It also encodes the decision procedure tying currentItemTarget, waitingItemTarget, and waitingItem together, which the schema documents piecewise but does not sequence. It repeats some schema text, limiting it below a 5.

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 opening sentence states a specific scenario and effect: a plan helper invoked after a domain tool starts async work and returns a real externalWaitId, which turns a target into a waiting row. It also distinguishes itself behaviorally from neighboring plan tools by saying it does not start, stop, retry, or interpret external work. It stops short of naming a sibling alternative, and the density makes the core purpose slower to extract than it should be.

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 gives a hard exclusion ('Do not call it when the domain tool failed or returned no externalWaitId') and conditional selection rules for when to supply waitingItemTarget vs waitingItem vs currentItemTarget. It also warns against attaching a wait to a completed parent or earlier failed attempt. What is missing is routing guidance to a sibling tool (e.g. add_plan_item or update_plan_item) when this helper is the wrong choice.

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.