MCPcopy Create free account
hub / github.com/Noumena-Network/code / isToolResultBlock

Function isToolResultBlock

src/utils/attachments.ts:2439–2446  ·  view source on GitHub ↗
(b: unknown)

Source from the content-addressed store, hash-verified

2437}
2438
2439function isToolResultBlock(b: unknown): b is ToolResultBlock {
2440 return (
2441 typeof b === 'object' &&
2442 b !== null &&
2443 (b as ToolResultBlock).type === 'tool_result' &&
2444 typeof (b as ToolResultBlock).tool_use_id === 'string'
2445 )
2446}
2447
2448/**
2449 * Check whether a user message's content contains tool_result blocks.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected