( toolName: string, toolCallId: string, parseError?: string, )
| 126 | } |
| 127 | |
| 128 | function stringInputError( |
| 129 | toolName: string, |
| 130 | toolCallId: string, |
| 131 | parseError?: string, |
| 132 | ): ToolCallError { |
| 133 | const parseDetails = parseError |
| 134 | ? ` Parsing as JSON failed: ${parseError}. The arguments may be malformed or incomplete.` |
| 135 | : ' Parsing succeeded, but the parsed value was still a string.' |
| 136 | return { |
| 137 | toolName, |
| 138 | toolCallId, |
| 139 | input: {}, |
| 140 | error: `Invalid parameters for ${toolName}: expected the tool arguments to be an object, but received a string.${parseDetails} Re-issue the tool call with the full arguments object and properly escaped string values.`, |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | function summarizeMissingReplacementFields( |
| 145 | toolName: string, |
no outgoing calls
no test coverage detected