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

Function getBlockByToolName

apps/sim/blocks/registry.ts:30–32  ·  view source on GitHub ↗
(toolName: string)

Source from the content-addressed store, hash-verified

28
29/** Find the block whose `tools.access` contains the given tool id. */
30export function getBlockByToolName(toolName: string): BlockConfig | undefined {
31 return Object.values(BLOCK_REGISTRY).find((b) => b.tools?.access?.includes(toolName))
32}
33
34/**
35 * Resolve the canonical (highest-version) block for a base type. Handles

Callers 2

blocks.test.tsFile · 0.90
getBlockIconAndColorFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected