[GH-ISSUE #3281] [langgraph]: Documentation is incorrect for dynamic tool assignment #2722

Open
opened 2026-06-05 17:26:28 -04:00 by yindo · 3 comments
Owner

Originally created by @maxheckel on GitHub (Mar 24, 2026).
Original GitHub issue: https://github.com/langchain-ai/docs/issues/3281

Type of issue

issue / bug

Language

JavaScript

Description

https://docs.langchain.com/oss/javascript/langchain/agents#runtime-tool-registration

On this page it states you can assign new tools at runtime, but when you try to do this you get this sample error:

Error: You have added a new tool in "wrapModelCall" hook of middleware "ReminderSkillMiddleware": scheduleReminder, deleteReminder, updateReminder, listReminders. This is not supported.

Langchain/graph version when I saw this error:
"@langchain/core": "1.2.26",
"@langchain/langgraph": "^1.0.14",

Originally created by @maxheckel on GitHub (Mar 24, 2026). Original GitHub issue: https://github.com/langchain-ai/docs/issues/3281 ### Type of issue issue / bug ### Language JavaScript ### Description https://docs.langchain.com/oss/javascript/langchain/agents#runtime-tool-registration On this page it states you can assign new tools at runtime, but when you try to do this you get this sample error: ``` Error: You have added a new tool in "wrapModelCall" hook of middleware "ReminderSkillMiddleware": scheduleReminder, deleteReminder, updateReminder, listReminders. This is not supported. ``` Langchain/graph version when I saw this error: "@langchain/core": "1.2.26", "@langchain/langgraph": "^1.0.14",
yindo added the langgraphexternal labels 2026-06-05 17:26:28 -04:00
Author
Owner

@sasmita016 commented on GitHub (Mar 27, 2026):

I was able to reproduce this locally.

Using wrapModelCall to append a new tool at runtime results in:
You have added a new tool in "wrapModelCall"... This is not supported.

Filtering existing tools works as expected, so this seems to be a docs mismatch rather than a runtime bug.

I’d like to work on updating the docs to clarify that wrapModelCall supports selecting/filtering pre-registered tools, but not introducing new ones at runtime.

<!-- gh-comment-id:4141170935 --> @sasmita016 commented on GitHub (Mar 27, 2026): I was able to reproduce this locally. Using `wrapModelCall` to append a new tool at runtime results in: `You have added a new tool in "wrapModelCall"... This is not supported.` Filtering existing tools works as expected, so this seems to be a docs mismatch rather than a runtime bug. I’d like to work on updating the docs to clarify that `wrapModelCall` supports selecting/filtering pre-registered tools, but not introducing new ones at runtime.
Author
Owner

@shobhavijay commented on GitHub (Apr 16, 2026):

@sasmita016 , do you have PR for this or are you still waiting to get this issue assigned to you ?

<!-- gh-comment-id:4261128382 --> @shobhavijay commented on GitHub (Apr 16, 2026): @sasmita016 , do you have PR for this or are you still waiting to get this issue assigned to you ?
Author
Owner

@sasmita016 commented on GitHub (Apr 17, 2026):

@shobhavijay PR: https://github.com/langchain-ai/docs/pull/3613

<!-- gh-comment-id:4266331473 --> @sasmita016 commented on GitHub (Apr 17, 2026): @shobhavijay PR: https://github.com/langchain-ai/docs/pull/3613
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/docs#2722