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

Function isToolReferenceBlock

src/utils/toolSearch.ts:481–488  ·  view source on GitHub ↗
(obj: unknown)

Source from the content-addressed store, hash-verified

479 * tool_reference is a beta feature not in the SDK types, so we need runtime checks.
480 */
481export function isToolReferenceBlock(obj: unknown): boolean {
482 return (
483 typeof obj === 'object' &&
484 obj !== null &&
485 'type' in obj &&
486 (obj as { type: unknown }).type === 'tool_reference'
487 )
488}
489
490/**
491 * Type guard for tool_reference block with tool_name.

Calls

no outgoing calls

Tested by

no test coverage detected