Skip to main content
Glama

BotSpot: AI Trading, Backtests and Bots

Replace plan item list

replace_plan_items
DestructiveIdempotent

Codex-style whole-plan update. Replaces the complete visible item list for the active plan in one call while preserving item ids when supplied. Use this when the visible checklist needs simple list/status synchronization or reorder cleanup. The array order is the display order. Omitted existing items are marked removed. Use this to record an unsuccessful/partial attempt and add explicit follow-up work in the same visible mutation. The follow-up item should reference the attempt with parentItemId or dependsOnItemIds. Prefer this over repeated add_plan_item retries when several unsuccessful/partial attempts need their follow-up references reconciled together. After a domain tool starts external work and returns an external id, this is the safest one-call way to mark the current item completed and append the new waiting validation item with externalKind/externalId evidence inside items[].evidence. Never put externalKind or externalId at the item top level; externalWaitId remains an item field. Every item must include label, completionCriteria, and any status/outcome/evidence needed to explain its current state. This does not perform domain work; it only mutates the visible plan.

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": {
      "items": "<items>"
    },
    "name": "replace_plan_items"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNo
itemsYesThe complete visible plan item list, in display order. Omitted existing items are marked removed.
titleNo
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.
conversationIdNoOptional conversation UUID. Omit this field to use the current MCP conversation context; never pass placeholders such as `current`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • removedInput schema / properties / items / items / additionalProperties
      Removed value: -false
    • addedInput schema / properties / items / items / anyOf
      Added value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "blockedDetails": {
      +        "anyOf": [
      +          {
      +            "maxLength": 1200,
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "blockedReason": {
      +        "anyOf": [
      +          {
      +            "enum": [
      +              "needs_user_decision",
      +              "workflow_budget_exhausted",
      +              "system_error",
      +              "unsupported_request",
      +              "other",
      +              "waiting_for_user",
      +              "waiting_for_external_event"
      +            ],
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "completionCriteria": {
      +        "description": "Model-visible evidence or condition that must be true before this item is marked completed.",
      +        "maxLength": 1200,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "dependsOnItemIds": {
      +        "anyOf": [
      +          {
      +            "items": {
      +              "$ref": "#/properties/items/items/anyOf/0/properties/parentItemId/anyOf/0"
      +            },
      +            "maxItems": 20,
      +            "type": "array"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Optional explicit item UUID dependencies. Do not use this to skip unresolved earlier work."
      +      },
      +      "evidence": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": {},
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Domain-tool evidence for this item. Put returned externalKind and externalId inside this object; they are not top-level item fields. Keep externalWaitId on the item itself when returned."
      +      },
      +      "externalWaitId": {
      +        "anyOf": [
      +          {
      +            "$ref": "#/properties/conversationId/anyOf/0"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "id": {
      +        "anyOf": [
      +          {
      +            "$ref": "#/properties/items/items/anyOf/0/properties/itemId/anyOf/0"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Optional alias for itemId when echoing an item returned by get_active_plan."
      +      },
      +      "itemId": {
      +        "anyOf": [
      +          {
      +            "anyOf": [
      +              {
      +                "$ref": "#/properties/items/items/anyOf/0/properties/parentItemId/anyOf/0"
      +              },
      +              {
      +                "maximum": 100,
      +                "minimum": 1,
      +                "type": "integer"
      +              }
      +            ]
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "label": {
      +        "maxLength": 240,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "outcome": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": false,
      +            "properties": {
      +              "evidence": {
      +                "anyOf": [
      +                  {
      +                    "additionalProperties": {},
      +                    "type": "object"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "status": {
      +                "description": "Plan-item outcome relative to this item's completionCriteria, not an external resource status. For external tool work, read the real external status/evidence first, store that evidence, then choose whether this plan item was satisfied, unsuccessful, partial, or not_applicable.",
      +                "enum": [
      +                  "satisfied",
      +                  "unsuccessful",
      +                  "partial",
      +                  "not_applicable"
      +                ],
      +                "type": "string"
      +              },
      +              "summary": {
      +                "maxLength": 1200,
      +                "minLength": 1,
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "status",
      +              "summary"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Optional plan-item outcome evidence. This is not backtest.status, deployment.status, or trade status; store external statuses in evidence and use outcome.status only to say whether this plan item satisfied its completionCriteria."
      +      },
      +      "parentItemId": {
      +        "anyOf": [
      +          {
      +            "maxLength": 80,
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Optional parent item UUID when this item is an explicit follow-up attempt or child of another visible item."
      +      },
      +      "rationale": {
      +        "anyOf": [
      +          {
      +            "maxLength": 1000,
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "revisionId": {
      +        "anyOf": [
      +          {
      +            "$ref": "#/properties/conversationId/anyOf/0"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "status": {
      +        "anyOf": [
      +          {
      +            "enum": [
      +              "pending",
      +              "in_progress",
      +              "waiting",
      +              "completed",
      +              "blocked",
      +              "skipped",
      +              "removed"
      +            ],
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "toolName": {
      +        "anyOf": [
      +          {
      +            "maxLength": 120,
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "waitDetails": {
      +        "anyOf": [
      +          {
      +            "maxLength": 1200,
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "waitReason": {
      +        "anyOf": [
      +          {
      +            "enum": [
      +              "waiting_for_user",
      +              "waiting_for_external_event"
      +            ],
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      }
      +    },
      +    "required": [
      +      "label",
      +      "completionCriteria"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "maxLength": 240,
      +    "minLength": 1,
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / items / items / properties
      Removed value: -{
      -  "blockedDetails": {
      -    "anyOf": [
      -      {
      -        "maxLength": 1200,
      -        "type": "string"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ]
      -  },
      -  "blockedReason": {
      -    "anyOf": [
      -      {
      -        "enum": [
      -          "needs_user_decision",
      -          "workflow_budget_exhausted",
      -          "system_error",
      -          "unsupported_request",
      -          "other",
      -          "waiting_for_user",
      -          "waiting_for_external_event"
      -        ],
      -        "type": "string"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ]
      -  },
      -  "completionCriteria": {
      -    "description": "Model-visible evidence or condition that must be true before this item is marked completed.",
      -    "maxLength": 1200,
      -    "minLength": 1,
      -    "type": "string"
      -  },
      -  "dependsOnItemIds": {
      -    "anyOf": [
      -      {
      -        "items": {
      -          "$ref": "#/properties/items/items/properties/parentItemId/anyOf/0"
      -        },
      -        "maxItems": 20,
      -        "type": "array"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ],
      -    "description": "Optional explicit item UUID dependencies. Do not use this to skip unresolved earlier work."
      -  },
      -  "evidence": {
      -    "anyOf": [
      -      {
      -        "additionalProperties": {},
      -        "type": "object"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ],
      -    "description": "Domain-tool evidence for this item. Put returned externalKind and externalId inside this object; they are not top-level item fields. Keep externalWaitId on the item itself when returned."
      -  },
      -  "externalWaitId": {
      -    "anyOf": [
      -      {
      -        "$ref": "#/properties/conversationId/anyOf/0"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ]
      -  },
      -  "id": {
      -    "anyOf": [
      -      {
      -        "$ref": "#/properties/conversationId/anyOf/0"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ],
      -    "description": "Optional alias for itemId when echoing an item returned by get_active_plan."
      -  },
      -  "itemId": {
      -    "anyOf": [
      -      {
      -        "$ref": "#/properties/conversationId/anyOf/0"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ]
      -  },
      -  "label": {
      -    "maxLength": 240,
      -    "minLength": 1,
      -    "type": "string"
      -  },
      -  "outcome": {
      -    "anyOf": [
      -      {
      -        "additionalProperties": false,
      -        "properties": {
      -          "evidence": {
      -            "anyOf": [
      -              {
      -                "additionalProperties": {},
      -                "type": "object"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "status": {
      -            "description": "Plan-item outcome relative to this item's completionCriteria, not an external resource status. For external tool work, read the real external status/evidence first, store that evidence, then choose whether this plan item was satisfied, unsuccessful, partial, or not_applicable.",
      -            "enum": [
      -              "satisfied",
      -              "unsuccessful",
      -              "partial",
      -              "not_applicable"
      -            ],
      -            "type": "string"
      -          },
      -          "summary": {
      -            "maxLength": 1200,
      -            "minLength": 1,
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "status",
      -          "summary"
      -        ],
      -        "type": "object"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ],
      -    "description": "Optional plan-item outcome evidence. This is not backtest.status, deployment.status, or trade status; store external statuses in evidence and use outcome.status only to say whether this plan item satisfied its completionCriteria."
      -  },
      -  "parentItemId": {
      -    "anyOf": [
      -      {
      -        "maxLength": 80,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ],
      -    "description": "Optional parent item UUID when this item is an explicit follow-up attempt or child of another visible item."
      -  },
      -  "rationale": {
      -    "anyOf": [
      -      {
      -        "maxLength": 1000,
      -        "type": "string"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ]
      -  },
      -  "revisionId": {
      -    "anyOf": [
      -      {
      -        "$ref": "#/properties/conversationId/anyOf/0"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ]
      -  },
      -  "status": {
      -    "anyOf": [
      -      {
      -        "enum": [
      -          "pending",
      -          "in_progress",
      -          "waiting",
      -          "completed",
      -          "blocked",
      -          "skipped",
      -          "removed"
      -        ],
      -        "type": "string"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ]
      -  },
      -  "toolName": {
      -    "anyOf": [
      -      {
      -        "maxLength": 120,
      -        "type": "string"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ]
      -  },
      -  "waitDetails": {
      -    "anyOf": [
      -      {
      -        "maxLength": 1200,
      -        "type": "string"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ]
      -  },
      -  "waitReason": {
      -    "anyOf": [
      -      {
      -        "enum": [
      -          "waiting_for_user",
      -          "waiting_for_external_event"
      -        ],
      -        "type": "string"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ]
      -  }
      -}
    • removedInput schema / properties / items / items / required
      Removed value: -[
      -  "label",
      -  "completionCriteria"
      -]
    • removedInput schema / properties / items / items / type
      Removed value: -"object"
  2. Changed11 schema fields changed
    • addedInput schema / properties / conversationId / anyOf
      Added value: +[
      +  {
      +    "format": "uuid",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / conversationId / format
      Removed value: -"uuid"
    • removedInput schema / properties / conversationId / type
      Removed value: -"string"
    • changedInput schema / properties / items / items / properties / externalWaitId / anyOf
      Previous value: -[
      -  {
      -    "$ref": "#/properties/conversationId"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "$ref": "#/properties/conversationId/anyOf/0"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / items / items / properties / id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "$ref": "#/properties/conversationId/anyOf/0"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Optional alias for itemId when echoing an item returned by get_active_plan."
      +}
    • changedInput schema / properties / items / items / properties / itemId / anyOf
      Previous value: -[
      -  {
      -    "$ref": "#/properties/conversationId"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "$ref": "#/properties/conversationId/anyOf/0"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / items / items / properties / revisionId / anyOf
      Previous value: -[
      -  {
      -    "$ref": "#/properties/conversationId"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "$ref": "#/properties/conversationId/anyOf/0"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / items / items / properties / status / anyOf
      Added value: +[
      +  {
      +    "enum": [
      +      "pending",
      +      "in_progress",
      +      "waiting",
      +      "completed",
      +      "blocked",
      +      "skipped",
      +      "removed"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / items / items / properties / status / enum
      Removed value: -[
      -  "pending",
      -  "in_progress",
      -  "waiting",
      -  "completed",
      -  "blocked",
      -  "skipped",
      -  "removed"
      -]
    • removedInput schema / properties / items / items / properties / status / type
      Removed value: -"string"
    • changedInput schema / properties / planId / anyOf
      Previous value: -[
      -  {
      -    "$ref": "#/properties/conversationId"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "$ref": "#/properties/conversationId/anyOf/0"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  3. Changed2 schema fields changed
    • changedInput schema / properties / items / items / properties / dependsOnItemIds / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "$ref": "#/properties/conversationId"
      -    },
      -    "maxItems": 20,
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "$ref": "#/properties/items/items/properties/parentItemId/anyOf/0"
      +    },
      +    "maxItems": 20,
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / items / items / properties / parentItemId / anyOf
      Previous value: -[
      -  {
      -    "$ref": "#/properties/conversationId"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "maxLength": 80,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  4. First observed

TDQS

A4.3/5.0
Behavior3/5

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

Annotations already flag destructiveHint=true, idempotentHint=true and openWorldHint=true, so the safety profile is partly covered. The description still adds genuinely non-obvious semantics: 'Omitted existing items are marked removed', array order equals display order, and ids are preserved when supplied. Those are soft-delete semantics rather than hard deletion, which the destructive annotation alone would not convey.

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

Conciseness4/5

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

Front-loaded with the core purpose and display-order rule, then layers exceptions in a sensible order. It drifts toward a run-on rule dump in the middle ('Use this to record an unsuccessful/partial attempt...' followed by two more rule sentences) and restates requirements the schema already enforces, but no sentence is purely filler.

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 5-parameter destructive mutation with nested item objects and no output schema, the definition covers selection, ordering, removal semantics, follow-up linkage, and evidence placement. It leaves the item status/outcome vocabulary to the schema enums and does not describe the mutation's response, a minor gap given no output schema exists.

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 60% schema coverage, the description compensates well: it mandates label and completionCriteria on every item, explains parentItemId/dependsOnItemIds as the follow-up linkage, and pins evidence placement ('Never put externalKind or externalId at the item top level; externalWaitId remains an item field'), which the schema only partially repeats. It says nothing about kind, title, or planId/conversationId scoping beyond what the schema carries.

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?

Opens with a specific verb+resource+scope ('Replaces the complete visible item list for the active plan in one call while preserving item ids when supplied'), which cleanly separates it from the granular siblings add_plan_item/update_plan_item/remove_plan_item. It also states what it does NOT do ('does not perform domain work; it only mutates the visible plan').

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit trigger conditions ('simple list/status synchronization or reorder cleanup', 'record an unsuccessful/partial attempt'), names the alternative it should replace ('Prefer this over repeated add_plan_item retries when several unsuccessful/partial attempts need their follow-up references reconciled together'), and scopes the external-work case to after a domain tool returns an external id.

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.