Skip to content

Commit 085085d

Browse files
feat(mcp): add dynamic operations and workflow access controls
1 parent 0bba808 commit 085085d

95 files changed

Lines changed: 3670 additions & 732 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/docs/content/docs/agents/mcp.mdx

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,16 +117,16 @@ Once MCP servers are configured, their tools become available within your agent
117117
/>
118118
</div>
119119

120-
4. Select individual tools, or choose **Use all N tools** to add every tool from that server
120+
4. Select individual tools, or choose **Configure operations access** for a dynamic server attachment
121121
5. The agent can now access these tools during execution
122122

123123
<Callout type="info">
124124
If you haven't configured a server yet, click **Add MCP Server** at the top of the dropdown to open the setup modal without leaving the block.
125125
</Callout>
126126

127-
## Standalone MCP Tool Block
127+
## Standalone MCP Block
128128

129-
For more granular control, you can use the dedicated MCP Tool block to execute specific MCP tools:
129+
Use the MCP block to discover operations or run one operation with explicit inputs:
130130

131131
<div className="flex justify-center">
132132
<Image
@@ -138,7 +138,30 @@ For more granular control, you can use the dedicated MCP Tool block to execute s
138138
/>
139139
</div>
140140

141-
The MCP Tool block runs one configured tool with parameters you set explicitly, and its output is readable by later blocks like any other.
141+
Choose an **Action**:
142+
143+
- **List operations** discovers authorized operation names, descriptions, and input schemas without executing provider operations. Filter by name or description, set a page size from 1 to 100, and pass `nextCursor` into the next request while `hasMore` is true. An authorized list can be empty.
144+
- **Run operation** executes one exact operation name. Configured operations keep their generated argument fields. For an operation name resolved at runtime, supply a JSON arguments object; Sim validates it against the operation's discovered schema before execution.
145+
146+
Server, managed connection, operation name, and arguments can use upstream block references. If you supply a managed connection separately, it must belong to the selected canonical server and be authorized for the workflow's workspace.
147+
148+
### Operations access
149+
150+
The standalone MCP block and **MCP Server (Advanced)** Agent attachment share three access modes:
151+
152+
| Mode | Behavior |
153+
| --- | --- |
154+
| **Only selected** | Allows only selected exact operation names. An empty selection allows nothing. Newly discovered names stay excluded. |
155+
| **All except selected** | Denies selected exact names. An empty selection allows everything otherwise permitted. Denied names stay saved if they temporarily disappear. |
156+
| **All permitted** | Allows every operation available to the authorized credential. |
157+
158+
New restricted configurations start with an empty explicit selection. Existing saved workflows retain their prior access through normalization, while current organization and credential authorization still apply.
159+
160+
Operation restrictions are saved in workflow state, on the MCP block or Agent attachment. An operation must be available to the authorized credential and permitted by the saved restriction.
161+
162+
Discovery filters the catalog shown to the editor and Agent. Execution checks the actual server, connection, and saved block restriction again before calling the provider. Missing or forbidden operations, unverifiable schemas, malformed arguments, and incorrect connection scopes fail the call. An Agent attachment with no permitted operations fails clearly.
163+
164+
Policies match exact MCP tool names on a canonical server. They do not inspect operation arguments: allowing a generic `execute_sql` operation does not limit which SQL it can execute.
142165

143166
## When to Use MCP Tool vs Agent
144167

apps/docs/openapi-v2-workflows.json

Lines changed: 186 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6523,6 +6523,95 @@
65236523
"AgentMcpTool": {
65246524
"type": "object",
65256525
"properties": {
6526+
"operationPolicy": {
6527+
"oneOf": [
6528+
{
6529+
"type": "object",
6530+
"properties": {
6531+
"mode": {
6532+
"type": "string",
6533+
"const": "all",
6534+
"description": "Allow all operations available to the authorized credential."
6535+
}
6536+
},
6537+
"required": ["mode"],
6538+
"additionalProperties": false
6539+
},
6540+
{
6541+
"type": "object",
6542+
"properties": {
6543+
"mode": {
6544+
"type": "string",
6545+
"const": "allow",
6546+
"description": "Allow only the selected exact operations."
6547+
},
6548+
"operations": {
6549+
"maxItems": 1000,
6550+
"type": "array",
6551+
"items": {
6552+
"type": "object",
6553+
"properties": {
6554+
"serverId": {
6555+
"type": "string",
6556+
"minLength": 1,
6557+
"maxLength": 256,
6558+
"description": "Canonical MCP server identity, independent of the selected credential."
6559+
},
6560+
"name": {
6561+
"type": "string",
6562+
"minLength": 1,
6563+
"maxLength": 256,
6564+
"description": "Exact operation name returned by MCP discovery."
6565+
}
6566+
},
6567+
"required": ["serverId", "name"],
6568+
"additionalProperties": false
6569+
},
6570+
"description": "Allowed server-scoped operation identities; an empty list grants no access."
6571+
}
6572+
},
6573+
"required": ["mode", "operations"],
6574+
"additionalProperties": false
6575+
},
6576+
{
6577+
"type": "object",
6578+
"properties": {
6579+
"mode": {
6580+
"type": "string",
6581+
"const": "deny",
6582+
"description": "Exclude the selected exact operations."
6583+
},
6584+
"operations": {
6585+
"maxItems": 1000,
6586+
"type": "array",
6587+
"items": {
6588+
"type": "object",
6589+
"properties": {
6590+
"serverId": {
6591+
"type": "string",
6592+
"minLength": 1,
6593+
"maxLength": 256,
6594+
"description": "Canonical MCP server identity, independent of the selected credential."
6595+
},
6596+
"name": {
6597+
"type": "string",
6598+
"minLength": 1,
6599+
"maxLength": 256,
6600+
"description": "Exact operation name returned by MCP discovery."
6601+
}
6602+
},
6603+
"required": ["serverId", "name"],
6604+
"additionalProperties": false
6605+
},
6606+
"description": "Denied server-scoped operation identities; an empty list allows otherwise permitted tools."
6607+
}
6608+
},
6609+
"required": ["mode", "operations"],
6610+
"additionalProperties": false
6611+
}
6612+
],
6613+
"description": "Saved workflow operation restrictions that can only narrow authorized credential access."
6614+
},
65266615
"type": {
65276616
"type": "string",
65286617
"const": "mcp",
@@ -6594,9 +6683,104 @@
65946683
"const": "mcp-server-advanced",
65956684
"description": "Server-wide MCP binding discriminator."
65966685
},
6686+
"operationPolicy": {
6687+
"oneOf": [
6688+
{
6689+
"type": "object",
6690+
"properties": {
6691+
"mode": {
6692+
"type": "string",
6693+
"const": "all",
6694+
"description": "Allow all operations available to the authorized credential."
6695+
}
6696+
},
6697+
"required": ["mode"],
6698+
"additionalProperties": false
6699+
},
6700+
{
6701+
"type": "object",
6702+
"properties": {
6703+
"mode": {
6704+
"type": "string",
6705+
"const": "allow",
6706+
"description": "Allow only the selected exact operations."
6707+
},
6708+
"operations": {
6709+
"maxItems": 1000,
6710+
"type": "array",
6711+
"items": {
6712+
"type": "object",
6713+
"properties": {
6714+
"serverId": {
6715+
"type": "string",
6716+
"minLength": 1,
6717+
"maxLength": 256,
6718+
"description": "Canonical MCP server identity, independent of the selected credential."
6719+
},
6720+
"name": {
6721+
"type": "string",
6722+
"minLength": 1,
6723+
"maxLength": 256,
6724+
"description": "Exact operation name returned by MCP discovery."
6725+
}
6726+
},
6727+
"required": ["serverId", "name"],
6728+
"additionalProperties": false
6729+
},
6730+
"description": "Allowed server-scoped operation identities; an empty list grants no access."
6731+
}
6732+
},
6733+
"required": ["mode", "operations"],
6734+
"additionalProperties": false
6735+
},
6736+
{
6737+
"type": "object",
6738+
"properties": {
6739+
"mode": {
6740+
"type": "string",
6741+
"const": "deny",
6742+
"description": "Exclude the selected exact operations."
6743+
},
6744+
"operations": {
6745+
"maxItems": 1000,
6746+
"type": "array",
6747+
"items": {
6748+
"type": "object",
6749+
"properties": {
6750+
"serverId": {
6751+
"type": "string",
6752+
"minLength": 1,
6753+
"maxLength": 256,
6754+
"description": "Canonical MCP server identity, independent of the selected credential."
6755+
},
6756+
"name": {
6757+
"type": "string",
6758+
"minLength": 1,
6759+
"maxLength": 256,
6760+
"description": "Exact operation name returned by MCP discovery."
6761+
}
6762+
},
6763+
"required": ["serverId", "name"],
6764+
"additionalProperties": false
6765+
},
6766+
"description": "Denied server-scoped operation identities; an empty list allows otherwise permitted tools."
6767+
}
6768+
},
6769+
"required": ["mode", "operations"],
6770+
"additionalProperties": false
6771+
}
6772+
],
6773+
"description": "Saved workflow operation restrictions that can only narrow authorized credential access."
6774+
},
65976775
"params": {
65986776
"type": "object",
65996777
"properties": {
6778+
"connectionId": {
6779+
"description": "Optional managed connection ID or upstream reference bound to the canonical server.",
6780+
"type": "string",
6781+
"minLength": 1,
6782+
"maxLength": 128
6783+
},
66006784
"serverId": {
66016785
"type": "string",
66026786
"minLength": 1,
@@ -6606,7 +6790,7 @@
66066790
},
66076791
"required": ["serverId"],
66086792
"additionalProperties": false,
6609-
"description": "Server identity for discovering and invoking every available MCP tool."
6793+
"description": "Server and optional connection identity for authorized operation discovery and execution."
66106794
},
66116795
"usageControl": {
66126796
"type": "string",
@@ -6619,7 +6803,7 @@
66196803
"description": "Forward-compatible MCP server metadata preserved by the workflow editor."
66206804
},
66216805
"title": "Agent MCP server (advanced)",
6622-
"description": "All tools available to the executing subject from one MCP server.",
6806+
"description": "Dynamically discovered operations permitted by the authorized credential and saved block policy.",
66236807
"examples": [
66246808
{
66256809
"type": "mcp-server-advanced",

0 commit comments

Comments
 (0)