Skip to main content
Glama

get_return

Retrieve detailed information about a specific return by providing the return ID using the ShipBob API MCP Server. Simplify return management for e-commerce fulfillment.

Input Schema

NameRequiredDescriptionDefault
returnIdYesThe ID of the return to retrieve

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "returnId": { "description": "The ID of the return to retrieve", "type": "string" } }, "required": [ "returnId" ], "type": "object" }

Implementation Reference

  • The handler function that implements the core logic of the 'get_return' tool: retrieves specific return details by ID from ShipBob API and formats as JSON response or handles errors.
    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 for the 'get_return' tool: a required string 'returnId'.
    schema: { returnId: z.string().describe("The ID of the return to retrieve") },
  • The full tool object definition for 'get_return', including name, description, schema, and handler reference, which is part of the exported returnTools array used for registration.
    { name: "get_return", description: "Get details of a specific return by ID", schema: { returnId: z.string().describe("The ID of the return to retrieve") }, 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/server.js:55-55 (registration)
    Registers the returnTools array (containing the 'get_return' tool) with the MCP server via the registerTools utility.
    registerTools(returnTools);
  • ShipBobClient helper method called by the tool handler to perform the actual API GET request for a return by ID.
    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