get-streams
Retrieve available project streams (called channels in Sunsama) to organize and categorize tasks within your workspace.
Instructions
Get streams for the user's group (streams are called 'channels' in the Sunsama UI)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/stream-tools.ts:4-14 (handler)The core handler for the 'get-streams' tool. Uses withTransportClient wrapper to fetch streams via context.client.getStreamsByGroupId() and formats response as TSV.export const getStreamsTool = withTransportClient({ name: "get-streams", description: "Get streams for the user's group (streams are called 'channels' in the Sunsama UI)", parameters: getStreamsSchema, execute: async (_args: GetStreamsInput, context: ToolContext) => { const streams = await context.client.getStreamsByGroupId(); return formatTsvResponse(streams); }, });
- src/schemas.ts:60-60 (schema)Zod input schema for 'get-streams' tool, defining no required parameters.export const getStreamsSchema = z.object({});
- src/main.ts:33-44 (registration)Server-level registration of all tools including 'get-streams' by calling registerTool on McpServer instance for each tool in allTools.allTools.forEach((tool) => { server.registerTool( tool.name, { description: tool.description, inputSchema: "shape" in tool.parameters ? tool.parameters.shape : tool.parameters, }, tool.execute, ); });
- src/tools/index.ts:3-9 (registration)Aggregates tool lists from various modules, including streamTools containing 'get-streams', into the allTools export used for server registration.import { streamTools } from "./stream-tools.js"; export const allTools = [ ...userTools, ...taskTools, ...streamTools, ];
- src/tools/stream-tools.ts:16-17 (registration)Local registration/export of the getStreamsTool in an array for inclusion in global tools list.export const streamTools = [getStreamsTool];