[PR #3018] [MERGED] Fix custom tool and tool-call issue sweep #5788

Closed
opened 2026-10-22 04:19:32 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3018
Author: @SpicyMarinara
Created: 6/29/2026
Status: ✅ Merged
Merged: 6/29/2026
Merged by: @SpicyMarinara

Base: staging ← Head: codex/tool-parser-issue-sweep-3005-3017


📝 Commits (2)

  • 84cff0d Fix custom tool and tool-call issue sweep
  • a16d1e7 Address tool-call review notes

📊 Changes

7 files changed (+248 additions, -54 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 packages/client/src/components/agents/ToolEditor.tsx (+36 -12)
📝 packages/server/src/routes/custom-tools.routes.ts (+22 -1)
📝 packages/server/src/services/generation/tool-resolution-runtime.ts (+40 -2)
📝 packages/server/src/services/llm/textual-tool-call-parser.ts (+89 -22)
📝 packages/server/src/services/tools/tool-executor.ts (+28 -16)
📝 packages/shared/src/utils/chat-summary-entries.ts (+32 -1)

📄 Description

Summary

Fixes the open custom-tool and tool-call issue sweep reported in #3005 through #3017.

What Changed

  • Preserved rich custom-tool parameter schemas through ToolEditor open/save/export, blocked blank webhook/script saves, and rejected built-in/custom name collisions at the custom-tool API boundary.
  • Normalized empty parameter schemas as zero-argument tools and recursively skipped malformed nested custom-tool schemas before provider calls.
  • Hardened textual tool-call parsing for JSON arrays inside tool tags and closing-tag literals inside quoted JSON string arguments.
  • Fixed built-in tool executor edge cases for edit-message replacement length, chat-variable cap enforcement, lorebook entry key/mode normalization, automated summary-entry growth, and Spotify volume normalization.
  • Updated the v2.0.7 changelog.

Validation

  • Parser probe via pnpm --filter @marinara-engine/server exec tsx -e ...
  • pnpm --filter @marinara-engine/server lint
  • pnpm --filter @marinara-engine/client lint
  • pnpm check
  • pnpm regression:prompt

Manual Verification Needed

  • Manually open/save/export an imported rich custom tool schema in the browser.
  • Manually verify webhook/script editor validation banners.
  • Manually verify a text-only model can execute multiple tagged tool calls and arguments containing literal closing-tag text.

Summary by CodeRabbit

  • New Features

    • Custom tools now better preserve advanced parameter settings when edited and saved.
    • Chat summaries now automatically keep within a capped number of automated entries.
  • Bug Fixes

    • Improved handling of tool-call text, including malformed or nested formats.
    • Prevented saving invalid custom tools and names that conflict with built-in tools.
    • Added stronger validation for tool parameter schemas and tool execution edge cases.
    • Fixed several chat, lorebook, and Spotify volume behaviors for more reliable results.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/3018 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 6/29/2026 **Status:** ✅ Merged **Merged:** 6/29/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `codex/tool-parser-issue-sweep-3005-3017` --- ### 📝 Commits (2) - [`84cff0d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/84cff0dc18fc4fcb4aff72f1a278b1cb1ab91d3e) Fix custom tool and tool-call issue sweep - [`a16d1e7`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a16d1e7e1928ae34d099a6753197a39f736142d1) Address tool-call review notes ### 📊 Changes **7 files changed** (+248 additions, -54 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `packages/client/src/components/agents/ToolEditor.tsx` (+36 -12) 📝 `packages/server/src/routes/custom-tools.routes.ts` (+22 -1) 📝 `packages/server/src/services/generation/tool-resolution-runtime.ts` (+40 -2) 📝 `packages/server/src/services/llm/textual-tool-call-parser.ts` (+89 -22) 📝 `packages/server/src/services/tools/tool-executor.ts` (+28 -16) 📝 `packages/shared/src/utils/chat-summary-entries.ts` (+32 -1) </details> ### 📄 Description ## Summary Fixes the open custom-tool and tool-call issue sweep reported in #3005 through #3017. ## What Changed - Preserved rich custom-tool parameter schemas through ToolEditor open/save/export, blocked blank webhook/script saves, and rejected built-in/custom name collisions at the custom-tool API boundary. - Normalized empty parameter schemas as zero-argument tools and recursively skipped malformed nested custom-tool schemas before provider calls. - Hardened textual tool-call parsing for JSON arrays inside tool tags and closing-tag literals inside quoted JSON string arguments. - Fixed built-in tool executor edge cases for edit-message replacement length, chat-variable cap enforcement, lorebook entry key/mode normalization, automated summary-entry growth, and Spotify volume normalization. - Updated the v2.0.7 changelog. ## Validation - Parser probe via `pnpm --filter @marinara-engine/server exec tsx -e ...` - `pnpm --filter @marinara-engine/server lint` - `pnpm --filter @marinara-engine/client lint` - `pnpm check` - `pnpm regression:prompt` ## Manual Verification Needed - Manually open/save/export an imported rich custom tool schema in the browser. - Manually verify webhook/script editor validation banners. - Manually verify a text-only model can execute multiple tagged tool calls and arguments containing literal closing-tag text. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Custom tools now better preserve advanced parameter settings when edited and saved. * Chat summaries now automatically keep within a capped number of automated entries. * **Bug Fixes** * Improved handling of tool-call text, including malformed or nested formats. * Prevented saving invalid custom tools and names that conflict with built-in tools. * Added stronger validation for tool parameter schemas and tool execution edge cases. * Fixed several chat, lorebook, and Spotify volume behaviors for more reliable results. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:19:32 +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#5788
No description provided.