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

Function countToolUses

src/utils/collapseReadSearch.ts:542–547  ·  view source on GitHub ↗

* Count the number of tool uses in a message (handles grouped tool uses).

(msg: RenderableMessage)

Source from the content-addressed store, hash-verified

540 * Count the number of tool uses in a message (handles grouped tool uses).
541 */
542function countToolUses(msg: RenderableMessage): number {
543 if (msg.type === 'grouped_tool_use') {
544 return msg.messages.length
545 }
546 return 1
547}
548
549/**
550 * Extract file paths from read tool inputs in a message.

Callers 1

collapseReadSearchGroupsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected