Skip to main content
Glama
darved2305

groww-mcp

by darved2305

modify_order

Adjust price or quantity of pending limit orders on Groww to update trading strategies before execution.

Instructions

Modify price/quantity of a pending limit order

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
order_idYesOrder ID to modify
quantityNoNew quantity
priceNoNew limit price
trigger_priceNoNew trigger price

Implementation Reference

  • The handler for the modify_order tool, which validates inputs and calls the growwClient.modifyOrder method.
    // ── modify_order ──────────────────────────────────────────
    server.tool(
      "modify_order",
      "Modify price/quantity of a pending limit order",
      {
        order_id: z.string().describe("Order ID to modify"),
        quantity: z.number().int().positive().optional().describe("New quantity"),
        price: z.number().positive().optional().describe("New limit price"),
        trigger_price: z.number().positive().optional().describe("New trigger price"),
      },
      async ({ order_id, quantity, price, trigger_price }) => {
        try {
          if (!quantity && !price && !trigger_price) {
            return mcpError("At least one of quantity, price, or trigger_price must be provided");
          }
    
          const result = await growwClient.modifyOrder({
            orderId: order_id,
            quantity,
            price,
            triggerPrice: trigger_price,
          });
    
          const changes: string[] = [];
          if (quantity) changes.push(`Quantity → ${quantity}`);
          if (price) changes.push(`Price → ${formatCurrencyExact(price)}`);
          if (trigger_price) changes.push(`Trigger → ${formatCurrencyExact(trigger_price)}`);
    
          const text = [
            `✏️ ORDER MODIFIED`,
            `${"─".repeat(40)}`,
            `Order ID:  ${result.orderId}`,
            `Status:    ${result.status}`,
            `Changes:   ${changes.join(", ")}`,
            `${result.message}`,
          ].join("\n");
          return mcpText(text);
        } catch (err) {
          return mcpError(normalizeError(err));
        }
      }
    );
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It implies a mutation ('modify') but doesn't state whether this requires specific permissions, if changes are reversible, what happens on failure, or any rate limits. For a financial tool with potential side effects, this is a significant gap in transparency.

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?

The description is a single, efficient sentence that front-loads the core purpose. Every word earns its place: 'modify' (action), 'price/quantity' (fields), 'pending limit order' (target). There is no fluff or redundancy.

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

Completeness2/5

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

Given the complexity of a financial order modification tool with no annotations and no output schema, the description is incomplete. It lacks behavioral context (e.g., error conditions, side effects), usage prerequisites, and output expectations. The agent must rely heavily on the schema and external knowledge.

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 fully documents all parameters. The description adds minimal value beyond the schema: it mentions 'price/quantity' but omits 'trigger_price', and doesn't clarify parameter interactions (e.g., if all fields are optional beyond 'order_id'). Baseline 3 is appropriate as 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?

The description clearly states the action ('modify') and target ('pending limit order'), specifying what fields can be modified ('price/quantity'). It distinguishes from siblings like 'cancel_order' or 'place_order' by focusing on modification rather than creation or cancellation. However, it doesn't explicitly mention that 'trigger_price' is also modifiable, which slightly reduces specificity.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., order must be pending), exclusions (e.g., cannot modify filled orders), or compare to siblings like 'cancel_order' or 'place_order'. The agent must infer usage from the name and context alone.

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/darved2305/groww-mcp'

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