execute_service_layer_write
Executes guarded OData PATCH, POST, or DELETE writes to the connected SAP Business One Service Layer database after profile and approval checks.
Instructions
Execute a guarded OData write (PATCH, POST or DELETE) against the currently connected SAP Business One Service Layer. These are real writes to the company database.
The verb must be in the connected profile's slAllowedMethods, and database must equal the connected Service Layer database exactly — connect_database prints both. A mismatch is denied.
Approval follows the profile's slWriteApproval, also printed by connect_database. "elicitation" (default): the server asks the user through an MCP approval form; clients without form elicitation cannot write. "client" or "none": the server executes after this client's own permission prompt, honoured only for Claude Code. On a "none" profile, prefer execute_service_layer_write_unattended, which does the same write without any approval; use this tool there only when the user asks to confirm the write. MCP_DRY_RUN previews but never executes a write, and MCP_SL_WRITES_ENABLED=false disables every write globally.
PATCH and DELETE accept one directly keyed entity endpoint only. POST accepts an entity set, a service operation, or one action on a keyed entity (Orders(12)/Close). Query options, navigation paths, absolute URLs, Login/Logout and $batch are denied.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Relative OData endpoint without the configured /b1s/v1/ or /b1s/v2/ root | |
| body | No | JSON object: required and non-empty for PATCH, optional for POST, forbidden for DELETE | |
| method | Yes | Must also be allowed by the connected profile's slAllowedMethods | |
| database | Yes | Connected company database exactly as connect_database prints it; shown to the approver and checked by the server |