get_channel
Retrieve specific channel details from ShipBob's e-commerce fulfillment platform using the channel ID to manage fulfillment operations.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channelId | Yes | The ID of the channel to retrieve |
Implementation Reference
- src/tools/channel-tools.js:32-47 (handler)Handler function for the 'get_channel' MCP tool. It takes a channelId, fetches the channel data from the ShipBob API client, and returns formatted JSON or an error message.handler: async ({ channelId }) => { try { const channel = await shipbobClient.getChannel(channelId); return { content: [{ type: "text", text: JSON.stringify(channel, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error retrieving channel: ${error.message}` }], isError: true }; } }
- src/tools/channel-tools.js:29-31 (schema)Zod schema defining the input parameter 'channelId' for the 'get_channel' tool.schema: { channelId: z.string().describe("The ID of the channel to retrieve") },
- src/server.js:57-57 (registration)Registers the channelTools array (including 'get_channel') with the MCP server via the registerTools utility function.registerTools(channelTools);
- src/api-client.js:158-160 (helper)ShipBobClient helper method 'getChannel' that makes the API request to retrieve a specific channel by ID, used by the tool handler.async getChannel(id) { return this.request('GET', `/channels/${id}`); }