mcp: add CallToolResult.getError (#481)
Provide a way for middleware to get the error from a tool call, demonstrating that we can add this functionality without making a breaking change. Leave getError unexported for now; we can export it (and setError) at any time. For #64.
This commit is contained in:
parent
b615fa49b1
commit
140b93980c
1 changed files with 91 additions and 11 deletions
|
|
@ -70,7 +70,7 @@ func TestSSEServer(t *testing.T) {
|
|||
&TextContent{Text: "hi user"},
|
||||
},
|
||||
}
|
||||
if diff := cmp.Diff(wantHi, gotHi); diff != "" {
|
||||
if diff := cmp.Diff(wantHi, gotHi, ctrCmpOpts...); diff != "" {
|
||||
t.Errorf("tools/call 'greet' mismatch (-want +got):\n%s", diff)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue