MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / readInventory

Function readInventory

e2e/scenarios/tool-descriptions.test.ts:391–402  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

389 // Only this run's lines: the shared selfhost admin may have other
390 // integrations in the inventory.
391 const readInventory = () =>
392 Effect.map(mcp.session(identity).describeTools(), (mcpTools) =>
393 (mcpTools.find((tool) => tool.name === "execute")?.description ?? "")
394 .split("## Available integrations")[1]
395 ?.split("\n")
396 .filter(
397 (line) =>
398 line.startsWith("- ") &&
399 (line.includes(openapiSlug) || line.includes(graphqlSlug)),
400 )
401 .join("\n"),
402 );
403 const inventory = yield* readInventory();
404
405 // Normalize the per-run randomness so artifacts diff cleanly across

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected