adorable-petabyte-73906
02/12/2026, 8:47 PMtall-airline-16756
02/12/2026, 8:47 PMtall-airline-16756
02/12/2026, 8:47 PMopenai.LLM.with_groq() / openai.LLM.withGroq() pattern) and ensure your tool definitions use a JSON Schema–compatible structure. The “invalid JSON” error usually means the tool schema or parameters aren’t serializing to valid JSON.
To help you quickly, please share the following so I can diagnose the exact cause:
• Whether you’re using Python or Node.js.
• The exact tool definition (the JSON/schema or code) you’re passing to the session (paste the code or schema that produces the error).
• The Groq model call snippet (how you create the session/LLM), e.g. your AgentSession / voice.AgentSession code.
• The full error message and any stack trace you see.
Common things to check while you paste that:
• Tool parameters must follow JSON Schema types (strings, numbers, booleans, objects, arrays). Avoid non-serializable types or functions in the schema.
• Ensure all keys/strings are quoted and there are no trailing commas or other JSON syntax errors.
• Descriptions, names, and parameter metadata should not include characters that break serialization.
• In Python, decorated tool functions should return JSON-serializable values (dicts/lists/primitives).
• In Node.js, define parameters as a proper schema object (for example using z.object(...)) and ensure execute returns serializable results.
If you prefer, paste the tool JSON/schema plus a minimal snippet showing how you construct the LLM session and I’ll point out the exact line that causes the invalid JSON and a corrected example.
If you want, I can also provide a small working example for your language once you tell me whether you’re on Python or Node.js.
Sources: Groq STT plugin guide | LiveKit Documentation | OpenAI LLM plugin guide | LiveKit Documentation | Groq LLM plugin guide | LiveKit Documentation | Large language models (LLM) overview | LiveKit Documentation | Tool definition and use | LiveKit Documentationgorgeous-hydrogen-44699
02/12/2026, 8:51 PMtall-airline-16756
02/12/2026, 8:51 PMend-call tool where the message says: "'required' present but 'properties' is missing." That pinpoints the problem: when a JSON Schema includes a required array, it must also include a properties object that defines those required fields.
What to change (short):
• If your tool needs parameters, add a properties object that declares each parameter (type, description, etc.), and keep your required list referencing names defined under properties.
• If your tool has no parameters, remove required (and properties) entirely or declare the schema as an empty object.
Examples you can copy and adapt
1) Tool with a single required parameter (Python style/schema):
# schema you send to the LLM / plugin must include properties
{
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "The reason for ending the call"
}
},
"required": ["reason"]
}
2) Tool with optional parameters:
{
"type": "object",
"properties": {
"reason": { "type": "string" },
"immediately": { "type": "boolean" }
}
# no "required" here, so both are optional
}
3) Tool with no parameters:
{
"type": "object"
}
Or simply omit function.parameters entirely if the system allows it.
If you use Python decorated tools, make sure the function signature matches the schema (or omit parameters if none are needed):
@function_tool()
async def end_call(ctx: RunContext, reason: str):
...
This should align with the schema that includes reason under properties.
Next steps I can take for you
• Paste your current end-call tool definition (the JSON/schema or the code). Tell me whether you're on Python or Node.js.
• I’ll point out the exact lines to change and provide a corrected, ready-to-run snippet.
If you paste the tool code now I’ll fix it and return the corrected schema and example usage.
Sources: Tool definition and use | LiveKit Documentation