MCPcopy
hub / github.com/codeaashu/claude-code / getLastToolUseName

Function getLastToolUseName

src/tools/AgentTool/agentToolUtils.ts:363–367  ·  view source on GitHub ↗
(message: MessageType)

Source from the content-addressed store, hash-verified

361 * or undefined if the message is not an assistant message with tool_use.
362 */
363export function getLastToolUseName(message: MessageType): string | undefined {
364 if (message.type !== 'assistant') return undefined
365 const block = message.message.content.findLast(b => b.type === 'tool_use')
366 return block?.type === 'tool_use' ? block.name : undefined
367}
368
369export function emitTaskProgress(
370 tracker: ProgressTracker,

Callers 2

runAsyncAgentLifecycleFunction · 0.85
callFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected