Skip to main content
Glama

Coupler Analytics

by railsware
handler.ts970 B
import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js' import { textResponse, buildErrorMessage } from '../../util/tool-response.js' import { COUPLER_ACCESS_TOKEN } from '../../env.js' import { CouplerioClient } from '../../lib/couplerio-client/index.js' import { logger } from '../../logger/index.js' 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 } }) }

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/railsware/coupler-io-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server