list_channels
Retrieve a list of sales channels integrated with ShipBob's e-commerce fulfillment system to manage and streamline multi-channel operations effectively.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {},
"type": "object"
}
Implementation Reference
- src/tools/channel-tools.js:9-23 (handler)The handler function that executes the list_channels tool logic: fetches channels via shipbobClient.getChannels(), formats as JSON text response, or returns error.handler: async () => { try { const channels = await shipbobClient.getChannels(); return { content: [{ type: "text", text: JSON.stringify(channels, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error listing channels: ${error.message}` }], isError: true }; }
- src/tools/channel-tools.js:8-8 (schema)The schema definition for list_channels tool, empty object indicating no input parameters required.schema: {},
- src/server.js:57-57 (registration)Registers the channelTools array (containing list_channels tool) to the MCP server using the registerTools utility function.registerTools(channelTools);
- src/api-client.js:154-156 (helper)Helper method on ShipBobClient that performs the API request to retrieve the list of channels from '/channels' endpoint.async getChannels() { return this.request('GET', '/channels'); }
- src/tools/index.js:8-8 (registration)Re-exports the channelTools array (including list_channels) for centralized import.export { channelTools } from './channel-tools.js';