-
Notifications
You must be signed in to change notification settings - Fork 137
feat(sdk): add tool call extension #1572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
0dc566f to
349185b
Compare
|
I think calling this an MCP extension is confusing. We should consider different naming (eliciation, tool approval, etc.). |
|
The idea was that it will cover more than just tool approvals but I was thinking of some "capabilities" to turn on and off, we should have a discussion also with @tomkis on the right approach. |
9a8799b to
7f6f450
Compare
| class ToolCallResponse(pydantic.BaseModel): | ||
| action: Literal["accept", "reject"] | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eventually, we may allow argument modification etc.
| class ToolCallRequest(pydantic.BaseModel): | ||
| server: Implementation | None | ||
| name: str | ||
| arguments: dict[str, Any] | None | ||
| annotations: ToolAnnotations | None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Supports Claude-like user experience:
Agent would like to call tool X of server Y with arguments A, do you approve?
Implementation of always allow is left upon the client.
apps/agentstack-sdk-py/src/agentstack_sdk/server/mcp/session.py
Outdated
Show resolved
Hide resolved
bdec082 to
0536800
Compare
|
I started with the review by reading the docs - without any prior context. My biggest concern currently is that i had to zoom in to the code to understand how it actually works; It's just a semantic layer on top of Input required that maps MCP tool metadata. What i originally anticipated was an extension that would somehow automagically plug into the MCP client to handle the tool approval for me, which is not the case. This is not necessarily a bad, however it is confusing because i think most users will be searching how to solve "real problem" - how do i let agenstack ui approve my MCP tools. Couple suggestions:
|
ba85270 to
cb0c80b
Compare
|
@tomkis Changed, please have another look 👍 |
Signed-off-by: Tomas Pilar <[email protected]>
Signed-off-by: Tomas Pilar <[email protected]>
74e5129 to
7fde38f
Compare
Signed-off-by: Tomas Pilar [email protected]
Summary
This PR adds a new MCP Tool Call Extension to AgentStack SDK.
This new extension should not be confused with existing MCP Service Extension. The purpose of the latter is to allow A2A clients provide MCP servers dynamically. The new extension is more akin to the oAuth extension, providing additional support to arbitrary MCP clients.
Linked Issues
Closes #1560
Documentation
If this PR adds new feature or changes existing. Make sure documentation is adjusted accordingly. If the docs is not needed, please explain why.