Skip to main content
Glama

Execute Trade

execute_trade
Destructive

Money-moving broker trade (may place a real order). Optional instance_id for algo-tracked live instance; omit for on-demand on broker_account_id/default. If mcp_require_confirm, returns pending_confirmation — Confirm in Gogi Activity. Use close_positions to flatten rather than inventing a sell quantity.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sideYesOrder direction.
symbolYesTradable ticker or instrument symbol.
quantityYesPositive units, contracts, or base-asset quantity to trade.
instance_idNoLive trading instance id (list_instances). Optional — omit for direct on-demand trading on the broker account.
linked_algo_idNoOptional LinkedAlgo id when multiple agent algos share the instance. Only applicable if instance_id is provided.
broker_account_idNoInteger `id` from list_brokers for the account the user picked (machine field). Never pass Alpaca/external account numbers.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNo
messageNo
successNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedOutput schema / description
      Previous value: -"Structured Gogi result. Error responses include error and message fields."New value: +"Structured result. Error responses include error and message."
    • addedOutput schema / properties
      Added value: +{
      +  "error": {
      +    "type": "string"
      +  },
      +  "message": {
      +    "type": "string"
      +  },
      +  "success": {
      +    "type": "boolean"
      +  }
      +}
  2. Changed4 schema fields changed
    • addedInput schema / properties / quantity / description
      Added value: +"Positive units, contracts, or base-asset quantity to trade."
    • addedInput schema / properties / side / description
      Added value: +"Order direction."
    • addedInput schema / properties / symbol / description
      Added value: +"Tradable ticker or instrument symbol."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "description": "Structured Gogi result. Error responses include error and message fields.",
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare destructive=true and non-idempotent, but the description adds behavior annotations cannot: real money movement, a conditional pending_confirmation return when mcp_require_confirm is set, and the required Confirm step in Gogi Activity. That confirmation workflow is the key operational context an agent needs.

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 that front-load the highest-risk fact (money-moving, real order) before mechanics. Every clause carries a constraint, default, or routing instruction; nothing is padding.

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 destructive, non-idempotent, open-world mutation with 100% schema coverage and an output schema, the description covers the essential extras: real-order consequence, confirmation state, and the flatten alternative. Return-value detail is correctly left to the output schema.

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 defines all six parameters and baseline would be 3. The description still adds decision-level meaning for instance_id (algo-tracked live instance vs on-demand default on broker_account_id), clarifying the optional-vs-omit tradeoff beyond the raw field docs.

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+resource (execute a broker trade) and immediately flags the stakes ('Money-moving broker trade (may place a real order)'), which lets an agent distinguish it from non-mutating siblings. It also names the sibling it is not (close_positions).

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 explicit routing: use close_positions to flatten rather than synthesizing a sell, and explains instance_id (algo-tracked live) vs omitting it (on-demand on broker_account_id/default). It does not cover when to prefer execute_trade over execute_prediction or create_algo, so it stops short of a full when/when-not matrix.

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.

Resources