get_return
Retrieve detailed information about a specific return in ShipBob's fulfillment system using its unique return ID.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| returnId | Yes | The ID of the return to retrieve |
Implementation Reference
- src/tools/return-tools.js:39-54 (handler)The handler function that executes the logic for the 'get_return' tool. It fetches the return details by ID using the ShipBob client and returns a formatted JSON response or an error message.handler: async ({ returnId }) => { try { const returnData = await shipbobClient.getReturn(returnId); return { content: [{ type: "text", text: JSON.stringify(returnData, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error retrieving return: ${error.message}` }], isError: true }; } }
- src/tools/return-tools.js:36-38 (schema)Zod schema defining the input parameter 'returnId' for the 'get_return' tool.schema: { returnId: z.string().describe("The ID of the return to retrieve") },
- src/server.js:55-55 (registration)Registers the returnTools array (containing the 'get_return' tool definition) with the MCP server using the registerTools utility function.registerTools(returnTools);
- src/api-client.js:136-138 (helper)Helper method in ShipBobClient that makes the API request to retrieve a specific return by ID, called by the tool handler.async getReturn(id) { return this.request('GET', `/returns/${id}`); }