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

Function isToolReferenceWithName

src/utils/toolSearch.ts:493–501  ·  view source on GitHub ↗

* Type guard for tool_reference block with tool_name.

(
  obj: unknown,
)

Source from the content-addressed store, hash-verified

491 * Type guard for tool_reference block with tool_name.
492 */
493function isToolReferenceWithName(
494 obj: unknown,
495): obj is { type: 'tool_reference'; tool_name: string } {
496 return (
497 isToolReferenceBlock(obj) &&
498 'tool_name' in (obj as object) &&
499 typeof (obj as { tool_name: unknown }).tool_name === 'string'
500 )
501}
502
503/**
504 * Type representing a tool_result block with array content.

Callers 1

Calls 1

isToolReferenceBlockFunction · 0.85

Tested by

no test coverage detected