ChatToolMessage - TypeScript SDK

ChatToolMessage type definition

The TypeScript SDK and docs are currently in beta. Report issues on GitHub.

Tool response message

Example Usage

1import { ChatToolMessage } from "@openrouter/sdk/models";
2
3let value: ChatToolMessage = {
4 content: "What is the capital of France?",
5 role: "tool",
6 toolCallId: "call_abc123",
7};

Fields

FieldTypeRequiredDescriptionExample
contentmodels.ChatToolMessageContent✔️Tool response contentThe weather in San Francisco is 72°F and sunny.
role”tool”✔️N/A
toolCallIdstring✔️ID of the assistant message tool call this message responds tocall_abc123