Commit 805b4b1
fix(adapters): wrap redacted MCP output in CallToolResult (#120)
* fix(adapters): wrap redacted MCP output in CallToolResult
When mcp_check_output returns redacted_data, the interceptor was
returning a plain str. langchain-mcp-adapters expects MCPToolCallResult
(CallToolResult | ToolMessage | Command) and calls .content on the
return value, causing AttributeError at runtime.
Now wraps the redacted string in a CallToolResult with a single
TextContent block, which is the correct return type for the interceptor
protocol. Also adds mcp>=1.0.0 as a new 'langgraph' optional extra and
to dev dependencies, with a lazy import that surfaces a clear error
message if mcp is not installed.
Fixes #119
* fix: split changelog into Added + Fixed sections, remove stray blank line
Separate the langgraph optional extra (Added) from the CallToolResult
bugfix (Fixed) to clarify why this is a minor version bump.
---------
Co-authored-by: Saurabh Jain <saurabhjain1592@gmail.com>1 parent 697b6d9 commit 805b4b1
5 files changed
Lines changed: 34 additions & 4 deletions
File tree
- axonflow
- adapters
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
8 | 20 | | |
9 | 21 | | |
10 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
538 | 538 | | |
539 | 539 | | |
540 | 540 | | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
541 | 550 | | |
542 | 551 | | |
543 | 552 | | |
| |||
574 | 583 | | |
575 | 584 | | |
576 | 585 | | |
577 | | - | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
578 | 589 | | |
579 | 590 | | |
580 | 591 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| |||
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| 65 | + | |
64 | 66 | | |
65 | 67 | | |
66 | 68 | | |
| 69 | + | |
67 | 70 | | |
68 | 71 | | |
69 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
192 | 193 | | |
193 | 194 | | |
194 | 195 | | |
195 | | - | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
196 | 200 | | |
197 | 201 | | |
198 | 202 | | |
| |||
0 commit comments