MCPcopy Index your code
hub / github.com/simstudioai/sim / generateSchemaFromBlocks

Function generateSchemaFromBlocks

apps/sim/lib/mcp/workflow-mcp-sync.ts:115–121  ·  view source on GitHub ↗
(blocks: Record<string, unknown>)

Source from the content-addressed store, hash-verified

113 * Generate MCP tool parameter schema from workflow blocks.
114 */
115export function generateSchemaFromBlocks(blocks: Record<string, unknown>): Record<string, unknown> {
116 const inputFormat = extractInputFormatFromBlocks(blocks)
117 if (!inputFormat || inputFormat.length === 0) {
118 return EMPTY_SCHEMA
119 }
120 return { ...generateToolInputSchema(inputFormat) }
121}
122
123/**
124 * Load a workflow's active deployed state and generate its MCP parameter schema.

Callers 2

syncMcpToolsForWorkflowFunction · 0.85

Calls 2

generateToolInputSchemaFunction · 0.90

Tested by

no test coverage detected