Call tools on connected MCP servers as agent tools.
Basic Usage
1from inferencesh import mcp_tool23list_issues = (4 mcp_tool("list_issues", "integ_abc123", "list_issues")5 .describe("List Linear issues with filtering and pagination")6 .build()7)How It Works
When the agent calls a connector tool:
- Runtime loads your team's integration credentials for the MCP server
- Opens a fresh MCP session to the remote server
- Calls the specified tool with the agent's arguments
- Returns the result to the agent
Credentials are never exposed to the agent.
Parameters
| Parameter | Description |
|---|---|
name | Tool name the agent sees |
integrationId | Your team's integration ID for the MCP server |
toolName | Tool name on the remote server (from belt mcp tools <slug>) |
Builder Methods
| Method | Description |
|---|---|
mcpTool(name, integrationId, toolName) | Create connector tool |
.describe(text) | Set description for LLM |
.display(name) | Human-readable name |
.requireApproval() | Require user approval |
.build() | Build the tool |
With Approval
For destructive operations:
1send_message = (2 mcp_tool("send_slack", "integ_xyz789", "send_message")3 .describe("Send a message to a Slack channel")4 .require_approval()5 .build()6)Finding Integration IDs
After connecting to a server via belt mcp connect, find the integration ID through the web UI (team settings → integrations) or API.
Finding Tool Names
List available tools on a connected server:
bash
1belt mcp tools linearcode
1linear — 24 tools23tool description4list_issues List issues with filtering and pagination5create_issue Create a new issue6update_issue Update an existing issue7...Use the tool name from this listing as the toolName parameter.
Full Example
1from inferencesh import mcp_tool23# Read-only tools4list_issues = (5 mcp_tool("list_issues", "integ_linear", "list_issues")6 .describe("List Linear issues for a project")7 .build()8)910get_issue = (11 mcp_tool("get_issue", "integ_linear", "get_issue")12 .describe("Get full details for a Linear issue")13 .build()14)1516# Write tools — require approval17create_issue = (18 mcp_tool("create_issue", "integ_linear", "create_issue")19 .describe("Create a new Linear issue")20 .require_approval()21 .build()22)2324notify_slack = (25 mcp_tool("notify_slack", "integ_slack", "send_message")26 .describe("Post a message to a Slack channel")27 .require_approval()28 .build()29)3031all_tools = [list_issues, get_issue, create_issue, notify_slack]Learn More
- Connectors Overview — what connectors are and how they work
- Browsing & Connecting — set up connections to MCP servers
- Agent Connector Tools — YAML config and examples