Skip to main content
Glama

jupiter_limit_order_create

Create limit orders on Solana to buy or sell tokens at a specified price. Supports single, OCO (take-profit/stop-loss), and OTOCO order types.

Instructions

Create a limit order. Returns a transaction to sign. Supports single, OCO (TP/SL), and OTOCO orders.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputMintYesMint of token to sell
outputMintYesMint of token to buy
inAmountYesAmount to sell in base units
outAmountYesMin amount to receive (sets limit price)
makerYesWallet address creating the order
expiredAtNoISO 8601 expiration time

Implementation Reference

  • The async handler function that executes the tool logic for jupiter_limit_order_create. It calls client.triggerCreate(args) and returns the result as a JSON string.
    async (args) => {
      const result = await client.triggerCreate(args);
      return JSON.stringify(result, null, 2);
    },
  • Input schema (Zod) defining the expected parameters: inputMint, outputMint, inAmount, outAmount, maker (all required strings), and expiredAt (optional string).
    {
      inputMint: z.string().describe("Mint of token to sell"),
      outputMint: z.string().describe("Mint of token to buy"),
      inAmount: z.string().describe("Amount to sell in base units"),
      outAmount: z.string().describe("Min amount to receive (sets limit price)"),
      maker: z.string().describe("Wallet address creating the order"),
      expiredAt: z.string().optional().describe("ISO 8601 expiration time"),
  • Registration of the tool 'jupiter_limit_order_create' via the register() function in the registerTriggerTools function.
    register(
      "jupiter_limit_order_create",
      "Create a limit order. Returns a transaction to sign. Supports single, OCO (TP/SL), and OTOCO orders.",
      {
        inputMint: z.string().describe("Mint of token to sell"),
        outputMint: z.string().describe("Mint of token to buy"),
        inAmount: z.string().describe("Amount to sell in base units"),
        outAmount: z.string().describe("Min amount to receive (sets limit price)"),
        maker: z.string().describe("Wallet address creating the order"),
        expiredAt: z.string().optional().describe("ISO 8601 expiration time"),
      },
      async (args) => {
        const result = await client.triggerCreate(args);
        return JSON.stringify(result, null, 2);
      },
    );
  • The triggerCreate client method that makes the actual HTTP POST request to /trigger/v2/orders/price with the provided parameters.
    /** Create a limit order (returns transaction to sign) */
    async triggerCreate(params: {
      inputMint: string;
      outputMint: string;
      inAmount: string;
      outAmount: string;
      maker: string;
      expiredAt?: string;
    }) {
      return this.request("/trigger/v2/orders/price", {
        method: "POST",
        body: params,
      });
    }
  • src/index.ts:40-58 (registration)
    The generic register() wrapper in the entry point that calls server.tool() from the MCP SDK, connecting the tool to the MCP server.
    function register(
      name: string,
      description: string,
      shape: Record<string, z.ZodType>,
      handler: (args: any) => Promise<string>,
    ) {
      server.tool(name, description, shape, async (args) => {
        try {
          const text = await handler(args);
          return { content: [{ type: "text" as const, text }] };
        } catch (err: any) {
          return {
            content: [{ type: "text" as const, text: `Error: ${err.message}` }],
            isError: true,
          };
        }
      });
      toolCount++;
    }
Behavior3/5

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

The description states that the tool 'Returns a transaction to sign,' which reveals a key behavioral trait: it does not execute the order directly. With no annotations provided, this is helpful but lacks elaboration on authorization, fees, or side effects.

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?

Two sentences, no redundant information. Every word adds value. Front-loaded with the core action and outcome.

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?

The description covers the main purpose, order types, and the return value (transaction to sign). While it lacks details on submission requirements, the 6 parameters are fully documented in the schema. No output schema is expected, so the description is reasonably complete.

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?

All 6 parameters have descriptions in the input schema (100% coverage). The description adds no additional parameter details beyond the schema, so baseline 3 is appropriate.

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?

The description clearly states the action 'Create a limit order' and specifies that it supports single, OCO, and OTOCO orders. This distinguishes it from sibling tools like jupiter_limit_orders (list) and jupiter_limit_order_cancel (cancel).

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 description mentions supported order types, giving context on when to use. However, it does not explicitly contrast with alternatives like jupiter_swap_build or jupiter_dca_create, nor does it provide when-not-to-use guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ExpertVagabond/jupiter-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server