Skip to main content
Glama

get_return

Retrieve detailed information about a specific return in ShipBob's fulfillment system using its unique return ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
returnIdYesThe ID of the return to retrieve

Implementation Reference

  • 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 }; } }
  • 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);
  • 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}`); }

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