list-dataflows
Retrieve a list of your Coupler.io data flows and find the UUID of any flow by its name.
Instructions
List my Coupler.io data flows. Use this to get the ID (uuid format) of a data flow by its name.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dataflows | Yes |
Implementation Reference
- src/tools/list-dataflows/handler.ts:8-27 (handler)The handler function that executes the 'list-dataflows' tool. It creates a CouplerioClient, queries dataflows with type=from_template, and returns the result as JSON.
export const handler = async (): Promise<CallToolResult> => { const coupler = new CouplerioClient({ auth: COUPLER_ACCESS_TOKEN }) const query = new URLSearchParams({ type: 'from_template' }) const response = await coupler.request(`/dataflows?${query}{?type}`) if (!response.ok) { const errorText = await buildErrorMessage({ response, customText: 'Failed to list data flows.'}) logger.error(errorText) return textResponse({ isError: true, text: errorText }) } const dataflows = await response.json() return textResponse({ text: JSON.stringify(dataflows, null, 2), structuredContent: { dataflows } }) } - Input and output schema definitions. Input is an empty strict object. Output describes an array of dataflows with id, name, last_successful_execution_id, and last_success_run_at fields.
import z from 'zod' import { zodToJsonSchema } from 'zod-to-json-schema' export const inputSchema = zodToJsonSchema(z.object({}).strict()) const zodOutputSchema = z.object({ dataflows: z.array( z.object({ id: z.string().describe('The ID of the dataflow.'), name: z.string().describe('The name of the dataflow.'), last_successful_execution_id: z.string().nullish().describe('The ID of the last successful run (execution) of the dataflow.'), last_success_run_at: z.string().nullish().describe('The date and time of the last successful run (execution) of the dataflow. ISO 8601 format.'), }) ) }) export const outputSchema = zodToJsonSchema(zodOutputSchema) - src/server/index.ts:38-48 (registration)Registration in the ListToolsRequestSchema handler that exposes the tool via MCP's list tools capability.
server.setRequestHandler( ListToolsRequestSchema, async () => ({ tools: [ getData.toolListEntry, getSchema.toolListEntry, listDataflows.toolListEntry, getDataflow.toolListEntry, ] }) ) - src/server/index.ts:10-15 (registration)Registration in the TOOL_MAP that maps the tool name 'list-dataflows' to its handler for invocation via CallToolRequestSchema.
const TOOL_MAP = { [getData.name]: getData.handler, [getSchema.name]: getSchema.handler, [listDataflows.name]: listDataflows.handler, [getDataflow.name]: getDataflow.handler, } - The index file that re-exports handler, defines name, description, annotations, and composes the toolListEntry for registration.
import { inputSchema, outputSchema } from './schema.js' export { handler } from './handler.js' export const name = 'list-dataflows' export const description = 'List my Coupler.io data flows. Use this to get the ID (uuid format) of a data flow by its name.' const annotations = { title: 'List Coupler.io data flows.', idempotentHint: true, } export const toolListEntry = { name, description, inputSchema, outputSchema, annotations, }