Skip to content

fix(code): render MCP tool errors and drop empty-string optional params - #3624

Merged
Mason Daugherty (mdrxy) merged 1 commit into
mainfrom
mdrxy/code/mcp-arg-normalize
May 27, 2026
Merged

fix(code): render MCP tool errors and drop empty-string optional params#3624
Mason Daugherty (mdrxy) merged 1 commit into
mainfrom
mdrxy/code/mcp-arg-normalize

Conversation

@mdrxy

Copy link
Copy Markdown
Member

Two small fixes for dcode tool failures. When an MCP tool raised a ToolException server-side, the UI surfaced Agent error: {'error': 'ToolException', 'message': 'An internal error occurred'} as a raw Python dict repr — the redacted-payload shape that langgraph_api emits for non-allowlisted exceptions. Separately, Slack's slack_search_public_and_private (and similar ID-shaped MCP params) rejected context_channel_id="" with "value is not a channel ID" whenever the model filled an optional string param with "" instead of omitting it.

Two small fixes for `dcode` tool failures. When an MCP tool raised a `ToolException` server-side, the UI surfaced `Agent error: {'error': 'ToolException', 'message': 'An internal error occurred'}` as a raw Python dict repr — the redacted-payload shape that `langgraph_api` emits for non-allowlisted exceptions. Separately, Slack's `slack_search_public_and_private` (and similar ID-shaped MCP params) rejected `context_channel_id=""` with `"value is not a channel ID"` whenever the model filled an optional string param with `""` instead of omitting it.
@github-actions github-actions Bot added dcode Related to `deepagents-code` fix A bug fix (PATCH) internal User is a member of the `langchain-ai` GitHub organization size: M 200-499 LOC labels May 27, 2026
@mdrxy
Mason Daugherty (mdrxy) enabled auto-merge (squash) May 27, 2026 15:01
@mdrxy
Mason Daugherty (mdrxy) merged commit fdf3db4 into main May 27, 2026
39 checks passed
@mdrxy
Mason Daugherty (mdrxy) deleted the mdrxy/code/mcp-arg-normalize branch May 27, 2026 15:05
Mason Daugherty (mdrxy) added a commit that referenced this pull request May 30, 2026
> [!CAUTION]
> Merging this PR will automatically publish to **PyPI** and create a
**GitHub release**.

For the full release process, see
[`.github/RELEASING.md`](https://github.com/langchain-ai/deepagents/blob/main/.github/RELEASING.md).

---

_Everything below this line will be the GitHub release body._

---


##
[0.1.7](deepagents-code==0.1.6...deepagents-code==0.1.7)
(2026-05-30)

### Features

* Add toggleable message timestamp footers
([#3662](#3662))
([977e110](977e110))

### Bug Fixes

* Fix zero tool MCP server rendering
([#3649](#3649))
([7e7a567](7e7a567))
* Centralize debug logging setup to package root
([#3650](#3650))
([5145ed1](5145ed1))
* Char-truncate execute tool preview output
([#3627](#3627))
([bb276e2](bb276e2))
* Handle stale slash-command `Enter` before completion popup renders
([#3647](#3647))
([9a28742](9a28742))
* Keep chat input focused when clicking a message
([#3655](#3655))
([daf6571](daf6571))
* Mention `Ctrl+R` in MCP reconnect toast
([#3622](#3622))
([3b4b086](3b4b086))
* Prevent duplicate-id crash on MCP reconnect and clipboard `NoScreen`
([#3632](#3632))
([6b9a3c0](6b9a3c0))
* Reconstruct message counts for `DeltaChannel` threads from writes
table ([#3668](#3668))
([27e1940](27e1940))
* Render MCP tool errors and drop empty-string optional params
([#3624](#3624))
([fdf3db4](fdf3db4))
* Respect line width in tool output previews
([#3646](#3646))
([ba1ad2d](ba1ad2d))
* Restore resumed thread model
([#3651](#3651))
([550a8ab](550a8ab))
* Tool spinner, result formatting, and expand-hint fixes
([#3661](#3661))
([54485a3](54485a3))

---

_Everything above this line will be the GitHub release body._

---

> [!NOTE]
> A **New Contributors** section is appended to the GitHub release notes
automatically at publish time (see [Release
Pipeline](https://github.com/langchain-ai/deepagents/blob/main/.github/RELEASING.md#release-pipeline),
step 2).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Mason Daugherty <mason@langchain.dev>
Co-authored-by: Mason Daugherty <github@mdrxy.com>
Marcelo5444 pushed a commit to Marcelo5444/deepagents that referenced this pull request Jul 30, 2026
…ms (langchain-ai#3624)

Two small fixes for `dcode` tool failures. When an MCP tool raised a
`ToolException` server-side, the UI surfaced `Agent error: {'error':
'ToolException', 'message': 'An internal error occurred'}` as a raw
Python dict repr — the redacted-payload shape that `langgraph_api` emits
for non-allowlisted exceptions. Separately, Slack's
`slack_search_public_and_private` (and similar ID-shaped MCP params)
rejected `context_channel_id=""` with `"value is not a channel ID"`
whenever the model filled an optional string param with `""` instead of
omitting it.
Marcelo5444 pushed a commit to Marcelo5444/deepagents that referenced this pull request Jul 30, 2026
> [!CAUTION]
> Merging this PR will automatically publish to **PyPI** and create a
**GitHub release**.

For the full release process, see
[`.github/RELEASING.md`](https://github.com/langchain-ai/deepagents/blob/main/.github/RELEASING.md).

---

_Everything below this line will be the GitHub release body._

---


##
[0.1.7](langchain-ai/deepagents@deepagents-code==0.1.6...deepagents-code==0.1.7)
(2026-05-30)

### Features

* Add toggleable message timestamp footers
([langchain-ai#3662](langchain-ai#3662))
([977e110](langchain-ai@977e110))

### Bug Fixes

* Fix zero tool MCP server rendering
([langchain-ai#3649](langchain-ai#3649))
([7e7a567](langchain-ai@7e7a567))
* Centralize debug logging setup to package root
([langchain-ai#3650](langchain-ai#3650))
([5145ed1](langchain-ai@5145ed1))
* Char-truncate execute tool preview output
([langchain-ai#3627](langchain-ai#3627))
([bb276e2](langchain-ai@bb276e2))
* Handle stale slash-command `Enter` before completion popup renders
([langchain-ai#3647](langchain-ai#3647))
([9a28742](langchain-ai@9a28742))
* Keep chat input focused when clicking a message
([langchain-ai#3655](langchain-ai#3655))
([daf6571](langchain-ai@daf6571))
* Mention `Ctrl+R` in MCP reconnect toast
([langchain-ai#3622](langchain-ai#3622))
([3b4b086](langchain-ai@3b4b086))
* Prevent duplicate-id crash on MCP reconnect and clipboard `NoScreen`
([langchain-ai#3632](langchain-ai#3632))
([6b9a3c0](langchain-ai@6b9a3c0))
* Reconstruct message counts for `DeltaChannel` threads from writes
table ([langchain-ai#3668](langchain-ai#3668))
([27e1940](langchain-ai@27e1940))
* Render MCP tool errors and drop empty-string optional params
([langchain-ai#3624](langchain-ai#3624))
([fdf3db4](langchain-ai@fdf3db4))
* Respect line width in tool output previews
([langchain-ai#3646](langchain-ai#3646))
([ba1ad2d](langchain-ai@ba1ad2d))
* Restore resumed thread model
([langchain-ai#3651](langchain-ai#3651))
([550a8ab](langchain-ai@550a8ab))
* Tool spinner, result formatting, and expand-hint fixes
([langchain-ai#3661](langchain-ai#3661))
([54485a3](langchain-ai@54485a3))

---

_Everything above this line will be the GitHub release body._

---

> [!NOTE]
> A **New Contributors** section is appended to the GitHub release notes
automatically at publish time (see [Release
Pipeline](https://github.com/langchain-ai/deepagents/blob/main/.github/RELEASING.md#release-pipeline),
step 2).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Mason Daugherty <mason@langchain.dev>
Co-authored-by: Mason Daugherty <github@mdrxy.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dcode Related to `deepagents-code` fix A bug fix (PATCH) internal User is a member of the `langchain-ai` GitHub organization size: M 200-499 LOC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant