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

Function buildRequiresActionDetails

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

Source from the content-addressed store, hash-verified

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

Callers 1

createCanUseToolMethod · 0.85

Calls 3

getToolUseSummaryMethod · 0.80
userFacingNameMethod · 0.80

Tested by

no test coverage detected