From 2a0dd385aad2c2cf3f898dbae9b139c16ce05e5d Mon Sep 17 00:00:00 2001 From: Chiranjeet Mishra Date: Wed, 14 Oct 2026 03:45:16 +0000 Subject: [PATCH] docs: fix tool-calls example payload shape on the Server URL events page toolCallList entries are { id, type, function: { name, arguments } } and toolWithToolCallList entries carry type, function and toolCall, matching the ToolCall and FunctionToolWithToolCall schemas and the custom tools page. The assistant example now uses model.tools; model.functions is not in the API schema. --- fern/server-url/events.mdx | 48 ++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/fern/server-url/events.mdx b/fern/server-url/events.mdx index a2db22bf5..0e5f1a5f1 100644 --- a/fern/server-url/events.mdx +++ b/fern/server-url/events.mdx @@ -49,17 +49,20 @@ Example assistant configuration (excerpt): "model": { "provider": "openai", "model": "gpt-4o", - "functions": [ + "tools": [ { - "name": "sendEmail", - "description": "Used to send an email to a client.", - "parameters": { - "type": "object", - "properties": { - "emailAddress": { "type": "string" }, - "message": { "type": "string" } - }, - "required": ["emailAddress", "message"] + "type": "function", + "function": { + "name": "sendEmail", + "description": "Used to send an email to a client.", + "parameters": { + "type": "object", + "properties": { + "emailAddress": { "type": "string" }, + "message": { "type": "string" } + }, + "required": ["emailAddress", "message"] + } } } ] @@ -74,14 +77,29 @@ When tools are triggered, your Server URL receives a `tool-calls` message: "message": { "type": "tool-calls", "call": { /* Call Object */ }, - "toolWithToolCallList": [ + "toolCallList": [ { - "name": "sendEmail", - "toolCall": { "id": "abc123", "parameters": { "emailAddress": "john@example.com", "message": "Hi!" } } + "id": "abc123", + "type": "function", + "function": { + "name": "sendEmail", + "arguments": { "emailAddress": "john@example.com", "message": "Hi!" } + } } ], - "toolCallList": [ - { "id": "abc123", "name": "sendEmail", "parameters": { "emailAddress": "john@example.com", "message": "Hi!" } } + "toolWithToolCallList": [ + { + "type": "function", + "function": { "name": "sendEmail", "parameters": { /* tool parameters schema */ } }, + "toolCall": { + "id": "abc123", + "type": "function", + "function": { + "name": "sendEmail", + "arguments": { "emailAddress": "john@example.com", "message": "Hi!" } + } + } + } ] } }