Skip to main content
The TypeScript SDK and docs are currently in beta. Report issues on GitHub.
Tool response message

Example Usage

import { ChatToolMessage } from "@openrouter/sdk/models";

let value: ChatToolMessage = {
  content: "What is the capital of France?",
  role: "tool",
  toolCallId: "call_abc123",
};

Fields

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