Skip to main content
Glama
bizino

BOS MCP Server

by bizino

bos_order_list

Retrieve and filter orders from BOS ERP by status, date range, and pagination to manage sales workflows.

Instructions

List orders with filters

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNo
page_sizeNo
statusNo
from_dateNo
to_dateNo

Implementation Reference

  • The handler function for 'bos_order_list' that makes a GET request to '/mcp/orders' with optional query params (page, page_size, status, from_date, to_date).
      handler: async (args, client) => client.get('/mcp/orders', args),
    },
  • Input schema for 'bos_order_list' defining optional filters: page, page_size, status, from_date, to_date.
    schema: {
      page: { type: 'number', optional: true },
      page_size: { type: 'number', optional: true },
      status: { type: 'string', optional: true },
      from_date: { type: 'string', optional: true },
      to_date: { type: 'string', optional: true },
    },
  • The tool 'bos_order_list' is defined inside the exported `orderTools` array (line 101-209), which is then spread into the main tool list in src/index.ts
    export const orderTools: McpTool[] = [
      {
        name: 'bos_order_list',
        description: 'List orders with filters',
        schema: {
          page: { type: 'number', optional: true },
          page_size: { type: 'number', optional: true },
          status: { type: 'string', optional: true },
          from_date: { type: 'string', optional: true },
          to_date: { type: 'string', optional: true },
        },
        handler: async (args, client) => client.get('/mcp/orders', args),
      },
      {
        name: 'bos_order_show',
        description: 'Get order details by ID',
        schema: { order_id: { type: 'string' } },
        handler: async (args, client) => client.get(`/mcp/orders/${args.order_id}`),
      },
      {
        name: 'bos_order_create',
        description: 'Create a new order',
        schema: {
          customer_id: { type: 'string' },
          items: { type: 'array', items: { type: 'object' } },
          shipping_address: { type: 'object', optional: true },
          payment_method: { type: 'string', optional: true },
          note: { type: 'string', optional: true },
        },
        handler: async (args, client) => client.post('/mcp/orders', args),
      },
      {
        name: 'bos_order_update_status',
        description: 'Update order status',
        schema: {
          order_id: { type: 'string' },
          status: { type: 'string', enum: ['pending', 'confirmed', 'processing', 'shipped', 'delivered', 'cancelled'] },
        },
        handler: async (args, client) => {
          const { order_id, status } = args;
          return client.put(`/mcp/orders/${order_id}/status`, { status });
        },
      },
      {
        name: 'bos_order_cancel',
        description: 'Cancel an order',
        schema: { order_id: { type: 'string' }, reason: { type: 'string', optional: true } },
        handler: async (args, client) => {
          const { order_id, reason } = args;
          return client.post(`/mcp/orders/${order_id}/cancel`, { reason });
        },
      },
      {
        name: 'bos_order_count_by_status',
        description: 'Get order counts grouped by status',
        schema: {},
        handler: async (_, client) => client.get('/mcp/orders/count-by-status'),
      },
      {
        name: 'bos_order_search',
        description: 'Search orders by invoice number or customer name',
        schema: { q: { type: 'string' } },
        handler: async (args, client) => client.get('/mcp/orders/search', args),
      },
      {
        name: 'bos_order_transactions',
        description: 'Get payment transactions for an order',
        schema: { order_id: { type: 'string' } },
        handler: async (args, client) => client.get(`/mcp/orders/${args.order_id}/transactions`),
      },
      {
        name: 'bos_order_shipping_info',
        description: 'Get shipping information for an order',
        schema: { order_id: { type: 'string' } },
        handler: async (args, client) => client.get(`/mcp/orders/${args.order_id}/shipping`),
      },
      {
        name: 'bos_order_update_shipping',
        description: 'Update shipping status for an order',
        schema: {
          order_id: { type: 'string' },
          shipping_status: { type: 'string', enum: ['pending', 'shipped', 'delivered', 'returned'] },
          tracking_number: { type: 'string', optional: true },
        },
        handler: async (args, client) => {
          const { order_id, ...data } = args;
          return client.put(`/mcp/orders/${order_id}/shipping`, data);
        },
      },
      {
        name: 'bos_order_add_note',
        description: 'Add a staff note to an order',
        schema: { order_id: { type: 'string' }, note: { type: 'string' } },
        handler: async (args, client) => client.post(`/mcp/orders/${args.order_id}/notes`, { note: args.note }),
      },
      {
        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:54-76 (registration)
    Main tool registration loop: all tools (including orderTools with bos_order_list) are registered with the MCP server via server.tool().
    // Register all tools with proper Zod schemas
    for (const tool of allTools) {
      const zodSchema = toZodSchema(tool.schema);
    
      server.tool(
        tool.name,
        tool.description,
        zodSchema.shape,
        async (args: any) => {
          try {
            const result = await tool.handler(args, client);
            return {
              content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }],
            };
          } catch (error: any) {
            return {
              content: [{ type: 'text' as const, text: JSON.stringify({ error: error.message || 'Unknown error' }) }],
              isError: true,
            };
          }
        }
      );
    }
  • The BosApiClient.get() method used by bos_order_list's handler to make GET requests to the API.
    async get<T>(path: string, params?: Record<string, any>): Promise<T> {
      return this.request<T>('GET', path, undefined, params);
    }
    
    async post<T>(path: string, data?: any): Promise<T> {
      return this.request<T>('POST', path, data);
    }
    
    async put<T>(path: string, data?: any): Promise<T> {
      return this.request<T>('PUT', path, data);
    }
    
    async delete<T>(path: string): Promise<T> {
      return this.request<T>('DELETE', path);
    }
Behavior2/5

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

No annotations provided, so description must convey behavioral traits. It only says 'with filters', omitting details like pagination (implied by page/page_size), filtering semantics, or return format. Minimal disclosure of behavior.

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 a single short sentence, but it is under-specified, not genuinely concise. It omits critical information, making it inadequate rather than efficient.

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?

Given 5 parameters, no output schema, and no annotations, the description is severely incomplete. It does not explain output, required parameters, filter behavior, or pagination, leaving agents blind to how to use the tool correctly.

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%, yet the description adds no information about the 5 parameters. It only mentions 'filters' generically, failing to explain the meaning or permissible values of page, page_size, status, from_date, to_date.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description states 'List orders with filters', identifying verb and resource. However, it does not distinguish from sibling tools like bos_order_search or bos_order_count_by_status, which also list orders with filters, reducing clarity.

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 on when to use this tool versus alternatives. Sibling tools like bos_order_search and bos_order_count_by_status exist, but the description provides no differentiation or usage context.

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