Skip to main content
Glama

get_orders_report

Generate detailed orders reports from the ShipBob API by specifying a date range and optional sales channel filter for enhanced e-commerce fulfillment insights.

Input Schema

NameRequiredDescriptionDefault
channelIdNoFilter by sales channel ID
endDateYesEnd date for the report (YYYY-MM-DD)
startDateYesStart date for the report (YYYY-MM-DD)

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "channelId": { "description": "Filter by sales channel ID", "type": "string" }, "endDate": { "description": "End date for the report (YYYY-MM-DD)", "type": "string" }, "startDate": { "description": "Start date for the report (YYYY-MM-DD)", "type": "string" } }, "required": [ "startDate", "endDate" ], "type": "object" }

Implementation Reference

  • The handler function that implements the core logic of the 'get_orders_report' tool. It constructs parameters from input, fetches the report via shipbobClient, and returns formatted JSON or error response.
    handler: async ({ startDate, endDate, channelId }) => { try { const params = { startDate, endDate, channelId }; const report = await shipbobClient.getOrdersReport(params); return { content: [{ type: "text", text: JSON.stringify(report, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error retrieving orders report: ${error.message}` }], isError: true }; } } },
  • Zod schema defining the input parameters for the 'get_orders_report' tool: required startDate and endDate as strings, optional channelId.
    schema: { startDate: z.string().describe("Start date for the report (YYYY-MM-DD)"), endDate: z.string().describe("End date for the report (YYYY-MM-DD)"), channelId: z.string().optional().describe("Filter by sales channel ID") },
  • src/server.js:58-58 (registration)
    Registers the reportingTools array (containing the 'get_orders_report' tool definition) with the MCP server using the registerTools utility.
    registerTools(reportingTools);
  • ShipBobClient method called by the tool handler to fetch the orders report from the ShipBob API endpoint '/reports/orders'.
    async getOrdersReport(params) { return this.request('GET', '/reports/orders', null, params); }

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/mattcoatsworth/shipbob-mcp-server'

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