Skip to main content
Glama

Mango Inventory

Reject order

reject_order
Destructive

Reject (decline) an order; order managers only. A non-empty reason is required; the requester is notified with it. Releases any reserved stock. Fails on already-closed orders. Irreversible: a closed order cannot be reopened.

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": {
      "orderId": "<orderId>",
      "reason": "<reason>"
    },
    "name": "reject_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
reasonYesRequired non-empty reason shown to the requester in their notification
orderIdYesOrder id (from list_orders)

Output Schema

NameRequiredDescriptionDefault
statusNoopen | in_fulfillment | fulfilled | rejected | cancelled
webUrlNoLink to this order in the web app, for a person to open; `orderId` is the handle for tool calls. Absent when the deployment has no public address
orderIdNoOrder id
closedAtNoClose time, epoch milliseconds
targetNameNoWho/where the order delivers to
closedAtIsoNoThe same moment as an ISO-8601 UTC timestamp — read THIS one; the server does no timezone conversion

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / orderId / description
      Previous value: -"Order id (find with list_orders)"New value: +"Order id (from list_orders)"
    • changedOutput schema / properties / webUrl / description
      Previous value: -"Link to this order in the web app — give your user THIS, never the raw `orderId` (that is a machine handle for your next call). Absent when the deployment has no public address"New value: +"Link to this order in the web app, for a person to open; `orderId` is the handle for tool calls. Absent when the deployment has no public address"
  2. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: the requester is notified with the supplied reason, reserved stock is released, closed orders fail, and the outcome is irreversible. These side effects are exactly what an agent needs before invoking a destructive mutation.

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?

Four short clauses, front-loaded with the action and permission scope, then side effects, then failure mode and irreversibility. No sentence is redundant.

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 two-parameter mutation with an output schema present, the description covers permissions, side effects, failure conditions, and reversibility. Return-value explanation 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.

Parameters3/5

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

Schema coverage is 100% and both parameters are already documented in the schema, including that the reason is non-empty and shown to the requester. The description restates that constraint but adds no syntax or format detail beyond the schema, so the baseline of 3 applies.

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?

Names a specific verb (reject/decline) and resource (order) and scopes it to order managers. It does not explicitly contrast with cancel_order, which is the closest sibling and behaves differently, so the agent must infer the distinction.

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 a clear permission precondition (order managers only) and a failure condition (already-closed orders), which tells the agent when the call will not succeed. It stops short of naming an alternative tool for the cases where rejection is not the right action.

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