ResponsesRequestToolFunction - TypeScript SDK

ResponsesRequestToolFunction type definition

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

Function tool definition

Example Usage

1import { ResponsesRequestToolFunction } from "@openrouter/sdk/models";
2
3let value: ResponsesRequestToolFunction = {
4 name: "get_weather",
5 parameters: {
6 "properties": {
7 "location": {
8 "description": "The city and state",
9 "type": "string",
10 },
11 "unit": {
12 "enum": [
13 "celsius",
14 "fahrenheit",
15 ],
16 "type": "string",
17 "x-speakeasy-unknown-values": "allow",
18 },
19 },
20 "required": [
21 "location",
22 ],
23 "type": "object",
24 },
25 type: "function",
26};

Fields

FieldTypeRequiredDescription
descriptionstringN/A
namestring✔️N/A
parametersRecord<string, *any*>✔️N/A
strictbooleanN/A
type”function”✔️N/A