OutputCustomToolCallItem - TypeScript SDK

OutputCustomToolCallItem type definition

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

A call to a custom (freeform-grammar) tool created by the model — distinct from function_call. Used for tools like Codex CLI’s apply_patch whose payload is opaque text rather than JSON arguments.

Example Usage

1import { OutputCustomToolCallItem } from "@openrouter/sdk/models";
2
3let value: OutputCustomToolCallItem = {
4 callId: "call-abc123",
5 input: "*** Begin Patch\n*** End Patch",
6 name: "apply_patch",
7 type: "custom_tool_call",
8};

Fields

FieldTypeRequiredDescription
callIdstring✔️N/A
idstringN/A
inputstring✔️N/A
namestring✔️N/A
namespacestringNamespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)
typemodels.OutputCustomToolCallItemType✔️N/A