MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / stringInputError

Function stringInputError

packages/agent-runtime/src/tools/tool-executor.ts:128–142  ·  view source on GitHub ↗
(
  toolName: string,
  toolCallId: string,
  parseError?: string,
)

Source from the content-addressed store, hash-verified

126}
127
128function 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
144function summarizeMissingReplacementFields(
145 toolName: string,

Callers 2

parseRawToolCallFunction · 0.85
parseRawCustomToolCallFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected