Skip to main content
Glama

get_channel

Retrieve channel details by specifying a channel ID to manage e-commerce fulfillment operations through the ShipBob API MCP Server.

Input Schema

NameRequiredDescriptionDefault
channelIdYesThe ID of the channel to retrieve

Input Schema (JSON Schema)

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

Implementation Reference

  • The asynchronous handler function that implements the core logic of the 'get_channel' MCP tool. It takes a channelId parameter, fetches the channel details from the ShipBob API client, and returns a formatted JSON response 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 }; } }
  • Zod schema defining the input validation for the 'get_channel' tool, specifying a required string 'channelId' parameter.
    schema: { channelId: z.string().describe("The ID of the channel to retrieve") },
  • src/server.js:57-57 (registration)
    Registration of the channelTools array (containing 'get_channel') with the MCP server's registerTools function.
    registerTools(channelTools);
  • src/server.js:23-32 (registration)
    The registerTools function that iterates over tool arrays and calls server.tool() to register each MCP tool, including 'get_channel'.
    const registerTools = (toolsArray) => { toolsArray.forEach(tool => { server.tool( tool.name, tool.schema, tool.handler, { description: tool.description } ); }); };
  • ShipBobClient method getChannel(id) that performs the API request to retrieve specific channel details, called by the tool handler.
    async getChannel(id) { return this.request('GET', `/channels/${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