Budibase/budibase · warning · Error
Invalid tool call summary response
Error message
Invalid tool call summary response
What it means
generateToolCallSummary asks the LLM for a short plain-text summary of a single tool call and normalizes it. If the normalized summary is empty (empty text, or only quotes/whitespace), it throws Error("Invalid tool call summary response"). Called from recordToolCall when recording each tool call on an agent request timeline.
Source
Thrown at packages/server/src/sdk/workspace/ai/agentRequests/helpers.ts:237
const result = await generateText({
model: llm.chat,
providerOptions: llm.providerOptions?.(false),
headers: {
"x-litellm-tags": "bb-agent-request-tool-call-summary",
},
instructions:
'Summarize a single tool call for a UI timeline entry, in plain user-friendly language, not technical jargon - describe what the action did and its outcome, e.g. "Searched tickets for email server errors" or "Failed to update the customer\'s address". Return plain text only. Use at most 6 to 7 words, no quotes, no punctuation unless necessary.',
prompt: JSON.stringify({
tool: readableName || toolName,
status,
input,
output,
}),
})
const summary = normalizeTitle(result.text || "")
if (!summary) {
throw new Error("Invalid tool call summary response")
}
return summary
}
export async function generateInteractionSummary({
latestPrompt,
agentId,
sessionId,
}: {
latestPrompt: string
agentId: string
sessionId: string
}): Promise<string> {
const agent = await sdk.ai.agents.getOrThrow(agentId)
const llm = await sdk.ai.llm.createLLM(
agent.aiconfig,
sessionId,View on GitHub (pinned to a81a902e9a)
Solutions
- Catch the error and fall back to a static summary built from the tool name and status (e.g. "Ran readableName — success")
- Check LiteLLM/provider logs for empty or filtered completions and fix the aiconfig
- Truncate very large tool input/output before prompting to avoid degenerate completions
Example fix
// before
const summary = await generateToolCallSummary({ toolName, status, ... })
// after
let summary
try {
summary = await generateToolCallSummary({ toolName, status, ... })
} catch {
summary = `${readableName || toolName} ${status === "success" ? "completed" : "failed"}`
} Defensive patterns
Strategy: fallback
Try / catch
let summary
try {
summary = await generateToolCallSummary({ toolName, status, input, output, agentId, sessionId })
} catch (err) {
if (err instanceof Error && err.message === "Invalid tool call summary response") {
summary = `${readableName || toolName} ${status}`
} else {
throw err
}
} Prevention
- Truncate large tool input/output before summarizing
- Check provider/content-filter logs when summaries come back empty
- Always keep a static fallback summary so tool-call recording never fails on the LLM
When it happens
Trigger: The LLM returns an empty, filtered, or whitespace-only completion when summarizing a tool call (e.g. very large/empty tool output, provider outage yielding empty body).
Common situations: Content filters suppressing output for sensitive tool input/output; provider misconfiguration in the agent's aiconfig; oversized prompts leading to empty completions.
Related errors
- Invalid agent request title response
- No response found
- Invalid agent request link response
- Invalid agent request link response: unknown requestId "${de
- Unable to retrieve object
AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29).
Data as JSON: /api/errors/3af61ece05324333.
Report an issue: GitHub.