Skip to main content
Glama

limit_buy

Destructive

Place a limit buy order to purchase a token automatically when its USD price drops to your target, with optional stop-loss and take-profit.

Instructions

Create a limit buy order — buy a token when price drops to target. Uses ABI-encoded + AES-encrypted computedData.

Input Schema

NameRequiredDescriptionDefault
amountYesNative token to spend in raw units (wei/lamports), a positive integer string
apiKeyNoAPI key for AES encryption
userIdNoControl wallet address (NOT managed wallet)
chainIdYesNumeric chain ID (e.g. 622112261 for Solana)
accountRefNoConnected account from gdex_connect. Supplies session key, wallet address, API key and session data so no secret is passed in chat
lossPercentNoStop-loss % below trigger, whole number under 100 (e.g. '25'), '0' to skip0
tokenAddressYesToken address to buy
triggerPriceYesUSD price at which to trigger the buy (plain decimal)
profitPercentNoTake-profit % above trigger, whole number (e.g. '50'), '0' to skip0
sessionPrivateKeyNoSession private key from sign-in

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv5.1.0
    • changedInput schema / properties / amount / description
      Previous value: -"Native token to spend in raw units (wei/lamports)"New value: +"Native token to spend in raw units (wei/lamports), a positive integer string"
    • changedInput schema / properties / lossPercent / description
      Previous value: -"Stop-loss % below trigger (e.g. '25'), '0' to skip"New value: +"Stop-loss % below trigger, whole number under 100 (e.g. '25'), '0' to skip"
    • changedInput schema / properties / profitPercent / description
      Previous value: -"Take-profit % above trigger (e.g. '50'), '0' to skip"New value: +"Take-profit % above trigger, whole number (e.g. '50'), '0' to skip"
    • changedInput schema / properties / triggerPrice / description
      Previous value: -"USD price at which to trigger the buy"New value: +"USD price at which to trigger the buy (plain decimal)"
  2. Changed2 schema fields changedv4.12.0
    • addedInput schema / properties / accountRef
      Added value: +{
      +  "description": "Connected account from gdex_connect. Supplies session key, wallet address, API key and session data so no secret is passed in chat",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "apiKey",
      -  "userId",
      -  "sessionPrivateKey",
      -  "chainId",
      -  "tokenAddress",
      -  "amount",
      -  "triggerPrice"
      -]New value: +[
      +  "chainId",
      +  "tokenAddress",
      +  "amount",
      +  "triggerPrice"
      +]
  3. First observedv4.11.3

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, readOnly=false and openWorld=true, so the mutation risk is covered by structured data. The description adds useful context that the order payload is ABI-encoded and AES-encrypted and that execution is conditional on price, but it omits whether funds are reserved, whether auth must be established first, and that the opaque "computedData" fragment is never explained.

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?

Two short sentences, front-loaded with the core action, with no filler. The closing "ABI-encoded + AES-encrypted computedData" phrase is jargon that doesn't help an agent decide or invoke anything, so it's slightly below fully earned.

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

Completeness3/5

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

For a destructive, open-world trading order with 10 parameters and no output schema, the description is minimally adequate: the action and trigger are clear, but the auth path (accountRef supplying the key vs. passing secrets directly), order persistence, and cancellation route are left entirely to the schema and sibling tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 10 parameters including the accountRef/sessionPrivateKey auth choice and the loss/profit percentage semantics. The description adds nothing beyond that, which is the baseline case when the schema does the heavy lifting.

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?

States a specific verb and resource ("Create a limit buy order") and immediately glosses the semantics ("buy a token when price drops to target"), which cleanly separates it from a market buy like buy_token and mirrors limit_sell. It stops short of naming sibling tools explicitly, so it misses the top mark.

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

Usage Guidelines3/5

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

The trigger condition implies the usage case relative to an immediate buy, but there is no explicit when/when-not guidance, no mention of prerequisites (gdex_connect / accountRef vs. sessionPrivateKey), and no pointer to get_limit_orders or direct_cancel_order for lifecycle management.

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

Deploy Server

Other Tools