MCPcopy Index your code
hub / github.com/codeaashu/claude-code / isToolReferenceWithName

Function isToolReferenceWithName

src/utils/toolSearch.ts:491–499  ·  view source on GitHub ↗

* Type guard for tool_reference block with tool_name.

(
  obj: unknown,
)

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 1

isToolReferenceBlockFunction · 0.85

Tested by

no test coverage detected