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

Function buildRequiresActionDetails

src/cli/structuredIO.ts:93–117  ·  view source on GitHub ↗
(
  tool: Tool,
  input: Record<string, unknown>,
  toolUseID: string,
  requestId: string,
)

Source from the content-addressed store, hash-verified

91}
92
93function buildRequiresActionDetails(
94 tool: Tool,
95 input: Record<string, unknown>,
96 toolUseID: string,
97 requestId: string,
98): RequiresActionDetails {
99 // Per-tool summary methods may throw on malformed input; permission
100 // handling must not break because of a bad description.
101 let description: string
102 try {
103 description =
104 tool.getActivityDescription?.(input) ??
105 tool.getToolUseSummary?.(input) ??
106 tool.userFacingName(input)
107 } catch {
108 description = tool.name
109 }
110 return {
111 tool_name: tool.name,
112 action_description: description,
113 tool_use_id: toolUseID,
114 request_id: requestId,
115 input,
116 }
117}
118
119type PendingRequest<T> = {
120 resolve: (result: T) => void

Callers 1

createCanUseToolMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected