UNPKG

spec-workflow-mcp

Version:

MCP server for managing spec workflow (requirements, design, implementation)

83 lines 1.85 kB
/** * MCP (Model Context Protocol) compatible type definitions * Standard interfaces conforming to MCP specification */ /** * MCP text content */ export interface McpTextContent { type: "text"; text: string; } /** * MCP image content */ export interface McpImageContent { type: "image"; data: string; mimeType: string; } /** * MCP audio content */ export interface McpAudioContent { type: "audio"; data: string; mimeType: string; } /** * MCP resource content */ export interface McpResourceContent { type: "resource"; resource: { uri: string; title?: string; mimeType: string; text?: string; }; } /** * MCP content type union */ export type McpContent = McpTextContent | McpImageContent | McpAudioContent | McpResourceContent; /** * MCP tool call result * This is the standard format that must be returned after tool execution */ export interface McpCallToolResult { content: McpContent[]; isError?: boolean; structuredContent?: unknown; } /** * Internally used workflow result * Used to pass data between functional modules */ export interface WorkflowResult { displayText: string; data: { success?: boolean; error?: string; [key: string]: unknown; }; resources?: Array<{ uri: string; title?: string; mimeType: string; text?: string; }>; } /** * Create text content */ export declare function createTextContent(text: string): McpTextContent; /** * Create resource content */ export declare function createResourceContent(resource: McpResourceContent['resource']): McpResourceContent; /** * Convert internal workflow result to MCP format */ export declare function toMcpResult(result: WorkflowResult): McpCallToolResult; //# sourceMappingURL=mcpTypes.d.ts.map