MCPcopy
hub / github.com/Fission-AI/OpenSpec / assertKnownTool

Function assertKnownTool

src/commands/workset-input.ts:76–83  ·  view source on GitHub ↗
(
  tool: string,
  table: OpenerDefinition[]
)

Source from the content-addressed store, hash-verified

74
75/** One spelling of "this tool id must exist in the merged table". */
76export function assertKnownTool(
77 tool: string,
78 table: OpenerDefinition[]
79): void {
80 if (findOpener(table, tool) === null) {
81 throw toolUnknownError(tool, table);
82 }
83}
84
85/** Final assembly shared by both compose paths: one validation rule. */
86export function finalizeWorkset(

Callers 2

composeInteractivelyFunction · 0.85
finalizeWorksetFunction · 0.85

Calls 2

findOpenerFunction · 0.85
toolUnknownErrorFunction · 0.85

Tested by

no test coverage detected