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

Function isToolResultBlockWithContent

src/utils/toolSearch.ts:513–522  ·  view source on GitHub ↗

* Type guard for tool_result blocks with array content.

(obj: unknown)

Source from the content-addressed store, hash-verified

511 * Type guard for tool_result blocks with array content.
512 */
513function isToolResultBlockWithContent(obj: unknown): obj is ToolResultBlock {
514 return (
515 typeof obj === 'object' &&
516 obj !== null &&
517 'type' in obj &&
518 (obj as { type: unknown }).type === 'tool_result' &&
519 'content' in obj &&
520 Array.isArray((obj as { content: unknown }).content)
521 )
522}
523
524/**
525 * Extract tool names from tool_reference blocks in message history.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected