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

Function pruneOverridesToSchema

apps/sim/lib/mcp/workflow-tool-schema.ts:220–230  ·  view source on GitHub ↗
(
  overrides: Record<string, string>,
  baseSchema: Record<string, unknown>
)

Source from the content-addressed store, hash-verified

218 * map never accumulates or resurrects descriptions for removed Start-block inputs.
219 */
220export function pruneOverridesToSchema(
221 overrides: Record<string, string>,
222 baseSchema: Record<string, unknown>
223): Record<string, string> {
224 const baseProperties = (baseSchema.properties ?? {}) as Record<string, unknown>
225 const pruned: Record<string, string> = {}
226 for (const [name, value] of Object.entries(overrides)) {
227 if (name in baseProperties) pruned[name] = value
228 }
229 return pruned
230}
231
232/**
233 * Derive the sparse description-override map between a full schema and the Start-block base: keep

Callers 3

syncMcpToolsForWorkflowFunction · 0.90
prepareWorkflowMcpToolFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected