> ## Documentation Index
> Fetch the complete documentation index at: https://openrouter-d02e98a0-mintlify-7021d5f4.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# OutputApplyPatchServerToolItem - Python SDK

> OutputApplyPatchServerToolItem method reference

<Warning>
  The Python SDK and docs are currently in beta.
  Report issues on [GitHub](https://github.com/OpenRouterTeam/python-sdk/issues).
</Warning>

An openrouter:apply\_patch server tool output item. The turn halts when validation succeeds so the client can apply the patch and echo an `apply_patch_call_output` on the next turn.

## Fields

| Field       | Type                                                                                                                             | Required             | Description                                                                                                                       | Example                                                                                                                         |
| ----------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `call_id`   | *Optional\[str]*                                                                                                                 | :heavy\_minus\_sign: | N/A                                                                                                                               |                                                                                                                                 |
| `id`        | *Optional\[str]*                                                                                                                 | :heavy\_minus\_sign: | N/A                                                                                                                               |                                                                                                                                 |
| `operation` | [Optional\[components.ApplyPatchCallOperation\]](../components/applypatchcalloperation.md)                                       | :heavy\_minus\_sign: | The patch operation requested by an `apply_patch_call`. `create_file` and `update_file` carry a V4A diff; `delete_file` omits it. | `{"diff": "@@ function main() {\n+  console.log(\"hi\");\n }`",<br />"path": "/src/main.ts",<br />"type": "update\_file"<br />} |
| `status`    | [components.ToolCallStatus](/client-sdks/python/api-reference/components/toolcallstatus)                                         | :heavy\_check\_mark: | N/A                                                                                                                               | completed                                                                                                                       |
| `type`      | [components.OutputApplyPatchServerToolItemType](/client-sdks/python/api-reference/components/outputapplypatchservertoolitemtype) | :heavy\_check\_mark: | N/A                                                                                                                               |                                                                                                                                 |
