[GH-ISSUE #4358] [Issue]: Tool arguments execute without schema validation and failures can look successful #2361

Closed
opened 2026-10-21 05:47:37 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @Xelvanis on GitHub (Jul 31, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4358

Summary

Tool calls can execute provider-supplied arguments without validating them against the JSON schema Marinara advertised to the provider. Malformed input can be replaced with an empty object, while semantic and HTTP failures can be returned to the model without an explicit failure signal.

Expected behavior

Marinara should require valid JSON objects, validate arguments against the advertised built-in or custom-tool schema before any side effect, and give the model an explicit failure result when execution fails.

Actual behavior

The executor previously treated malformed JSON as {}, did not enforce advertised parameter schemas at execution time, and marked returned error objects or non-2xx webhook responses as successful tool executions.

Steps to reproduce

  1. Create and enable a custom webhook tool whose schema requires an action string and an email-formatted target.
  2. Have an OpenAI-compatible provider call it with malformed JSON, missing fields, or an invalid email value.
  3. Observe that the call is not rejected by the advertised schema before execution.
  4. Return HTTP 409 from the webhook and observe that the model receives the response without a reliable failure envelope.

Environment

  • Marinara Engine version: 2.3.5 (staging before commit 32495d36f)
  • Install type: source
  • OS + version: Windows 11 Pro 10.0.26200
  • Browser or app shell: Chrome / Vite development app

Logs, screenshots, or video

A deterministic local provider/webhook fixture was used during fix verification. It covered malformed JSON, missing required fields, invalid email format, HTTP 409, and successful execution without contacting an external provider.

Additional context

Implementation owner: @Xelvanis

The smallest fix is to enforce the same schemas at the centralized executor boundary and preserve structured failure state for every model-facing tool path.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Xelvanis on GitHub (Jul 31, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4358 ## Summary Tool calls can execute provider-supplied arguments without validating them against the JSON schema Marinara advertised to the provider. Malformed input can be replaced with an empty object, while semantic and HTTP failures can be returned to the model without an explicit failure signal. ## Expected behavior Marinara should require valid JSON objects, validate arguments against the advertised built-in or custom-tool schema before any side effect, and give the model an explicit failure result when execution fails. ## Actual behavior The executor previously treated malformed JSON as `{}`, did not enforce advertised parameter schemas at execution time, and marked returned error objects or non-2xx webhook responses as successful tool executions. ## Steps to reproduce 1. Create and enable a custom webhook tool whose schema requires an `action` string and an email-formatted `target`. 2. Have an OpenAI-compatible provider call it with malformed JSON, missing fields, or an invalid email value. 3. Observe that the call is not rejected by the advertised schema before execution. 4. Return HTTP 409 from the webhook and observe that the model receives the response without a reliable failure envelope. ## Environment - Marinara Engine version: 2.3.5 (`staging` before commit `32495d36f`) - Install type: source - OS + version: Windows 11 Pro 10.0.26200 - Browser or app shell: Chrome / Vite development app ## Logs, screenshots, or video A deterministic local provider/webhook fixture was used during fix verification. It covered malformed JSON, missing required fields, invalid email format, HTTP 409, and successful execution without contacting an external provider. ## Additional context Implementation owner: @Xelvanis The smallest fix is to enforce the same schemas at the centralized executor boundary and preserve structured failure state for every model-facing tool path. <!-- task-id: validate-tool-call-arguments-before-execution --> ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:47:37 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#2361
No description provided.