Skip to content

feat(agent-vault): read allowedTools on a session's MCP servers - #71

Merged
scott-ray-wilson merged 1 commit into
mainfrom
scott/av-inline-mcp-allowed-tools
Nov 13, 2026
Merged

scott-ray-wilson merged 1 commit into
mainfrom
scott/av-inline-mcp-allowed-tools

Conversation

@scott-ray-wilson

Copy link
Copy Markdown
Contributor

Context

Infisical/infisical#9418 lets an MCP server sent with a session (services on sessions.create) take allowedTools, the same as an MCP server in an access bundle.

Sending the field already works, because services takes dicts with the API's field names. Reading it back didn't: AgentVaultInlineService had no allowedTools field, and BaseModel.from_dict drops keys it doesn't know, so every session the SDK returned was missing the tool list. This change:

  • adds allowedTools: Optional[List[str]] to AgentVaultInlineService. It's None when the server allows every tool, or when the Infisical version doesn't return it.
  • updates the sessions.create docstring, which said an inline MCP server can't be limited to some of its tools, to say how to send allowedTools.

It's safe to release before or after the server. If a caller sends allowedTools to an Infisical version without #9418, that version refuses the session with a 400 that names the field. The new field defaults to None.

Steps to verify the change

  • The SDK's test suite passes, including a new case that sends an inline MCP server with allowedTools and reads it back, both as a list and as None.
  • Against main's model, the new test fails at the read-back (created.services[0].allowedTools is None), which is the dropped field.
  • I tested the server side against a local Infisical running #9418, with a real proxy: the session's tools/list showed only the listed tool, and the proxy refused calls to the other tools.

🤖 Generated with Claude Code

An MCP server sent with a session can now be limited to some of its tools
(Infisical/infisical#9418). AgentVaultInlineService keeps allowedTools, which
from_dict used to drop as an unknown field, and the sessions.create docs say
how to send it instead of saying inline MCP servers can't be limited.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@infisical-review-police

Copy link
Copy Markdown

💬 Discussion in Slack: #pr-review-python-sdk-official-71-feat-agent-vault-read-allowedtools-on-a-session

Posted by Review Police — reviews, comments, new commits, and CI failures will stream into this channel.

@greptile-apps

greptile-apps Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Low impact] This PR appears safe to merge.

Summary

Adds allowedTools to AgentVaultInlineService so session responses keep an MCP server’s tool list.

  • Session services now show which MCP tools are allowed.

Reviews (1) · Last reviewed commit: "feat(agent-vault): read allowedTools on ..." · Reviewed by Greptile

@linear

linear Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

AGE2-369

AGE2-370

@scott-ray-wilson
scott-ray-wilson merged commit 0b65dd4 into main Nov 13, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants