Skip to main content
Glama
bizino

BOS MCP Server

by bizino

bos_order_refund

Refund an order by providing its ID, amount, and reason.

Instructions

Process a refund for an order

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
order_idYes
amountNo
reasonNo

Implementation Reference

  • The handler function that processes a refund by extracting order_id from args and POSTing remaining data to /mcp/orders/{order_id}/refund via the API client.
    handler: async (args, client) => {
      const { order_id, ...data } = args;
      return client.post(`/mcp/orders/${order_id}/refund`, data);
    },
  • Input schema for bos_order_refund: order_id (required string), amount (optional number), reason (optional string).
    schema: {
      order_id: { type: 'string' },
      amount: { type: 'number', optional: true },
      reason: { type: 'string', optional: true },
    },
  • The tool definition object with name 'bos_order_refund', registered as part of the orderTools array in src/tools/bos.ts, which is then exported and collected into allTools in src/index.ts.
      {
        name: 'bos_order_refund',
        description: 'Process a refund for an order',
        schema: {
          order_id: { type: 'string' },
          amount: { type: 'number', optional: true },
          reason: { type: 'string', optional: true },
        },
        handler: async (args, client) => {
          const { order_id, ...data } = args;
          return client.post(`/mcp/orders/${order_id}/refund`, data);
        },
      },
    ];
  • src/index.ts:27-46 (registration)
    The allTools array in src/index.ts aggregates all tool arrays including orderTools (via spread), which contains bos_order_refund. Each tool is then registered with the MCP server via server.tool() in the loop at lines 55-72.
    const allTools: McpTool[] = [
      ...healthTools,
      ...moduleTools,
      ...routeTools,
      ...cacheTools,
      ...systemTools,
      ...productTools,
      ...orderTools,
      ...cartTools,
      ...customerTools,
      ...inventoryTools,
      ...voucherTools,
      ...loyaltyTools,
      ...storeTools,
      ...checkoutTools,
      ...promotionTools,
      ...engagementTools,
      ...erpTools,
      ...smartTools,
    ];
  • The McpTool interface definition used by all tool definitions, including bos_order_refund. It specifies the structure: name, description, schema, and handler.
    export interface McpTool {
      name: string;
      description: string;
      schema: Record<string, any>;
      handler: (args: any, client: BosApiClient) => Promise<any>;
    }
Behavior2/5

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

No annotations are provided, so the description must disclose behavioral traits. It only says 'Process a refund', which implies mutation but does not describe side effects (e.g., changes to order status, inventory, or payment). No information on permissions or reversibility.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise (one sentence) but at the cost of completeness given the 3 parameters and no annotations. It does front-load purpose but lacks necessary detail.

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

Completeness1/5

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

With no output schema and no annotations, the description fails to cover return values, error conditions, or what constitutes a successful refund. It is insufficient for an agent to correctly invoke this tool.

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

Parameters1/5

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

Schema description coverage is 0%, so the description should explain the parameters. It does not mention what order_id, amount, or reason mean. The description adds no value beyond the schema types.

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 'Process a refund for an order' clearly states the action (process a refund) and the resource (an order). It distinguishes from siblings like bos_order_cancel, which cancels an order rather than refunding it. However, it could be more specific (e.g., full vs partial refund).

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?

No guidance is provided about when to use this tool versus alternatives. For example, it does not differentiate from bos_order_cancel or explain prerequisites such as order status needed for refund.

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/bizino/bos-mcp'

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