JuliusBrussee/caveman · error
tool_schema_transform_invalid:${segmentID}
Error message
tool_schema_transform_invalid:${segmentID} What it means
Error "tool_schema_transform_invalid:${segmentID}" thrown in JuliusBrussee/caveman.
Source
Thrown at packages/agent/src/runtime.ts:3804
: "Use cave_retrieve for omitted detail.",
].join("\n"),
}],
details: {
effect: definition.effect,
resultPolicy: definition.result,
recoveryHandle: transformed.handle,
recoveryVerified: true,
},
};
},
};
}
function validatedToolSchemaBytes(output: Uint8Array, segmentID: string): Uint8Array {
const parsed = JSON.parse(new TextDecoder().decode(output)) as unknown;
if (!isRecord(parsed) || typeof parsed.name !== "string" ||
typeof parsed.description !== "string" || !isRecord(parsed.input)) {
throw new Error(`tool_schema_transform_invalid:${segmentID}`);
}
return output;
}
function providerToolDefinition(
definition: ToolDefinition,
lowered: LoweredContext,
appliedPlan: AppliedPlan,
): { description: string; input: TSchema } {
const segment = lowered.ir.segments.find((item) => item.id === `tool.${definition.name}`);
if (!segment) throw new Error(`cave_context_segment_missing:tool.${definition.name}`);
const body = appliedPlan.bodies.get(segment.bodyHandle);
if (!body) throw new Error(`cave_context_body_missing:tool.${definition.name}`);
const parsed = JSON.parse(new TextDecoder().decode(body)) as unknown;
if (!isRecord(parsed) || parsed.name !== definition.name ||
typeof parsed.description !== "string" || !isRecord(parsed.input)) {
throw new Error(`cave_tool_schema_invalid:${definition.name}`);
}View on GitHub (pinned to 27d5a3981a)
Solutions
- The tool schema transform for the segment is invalid; fix the transform definition for that segment.
When it happens
Trigger: Thrown at packages/agent/src/runtime.ts:3804 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of JuliusBrussee/caveman@27d5a3981a (2026-08-15).
Data as JSON: /api/errors/f458515172a1edad.
Report an issue: GitHub.