Connector Tools

Call tools on connected MCP servers as agent tools.


Basic Usage

1from inferencesh import mcp_tool23list_issues = (4    mcp_tool("list_issues", "cred_abc123", "list_issues")5    .describe("List Linear issues with filtering and pagination")6    .build()7)

How It Works

At load time, the runtime resolves each connector tool's description and input schema from the credential's cached tool list, with live fetch and a generic arguments fallback when needed. See Tool Schema and Description.

At call time, when the agent invokes a connector tool:

  1. Runtime loads your workspace's credentials for the MCP server
  2. Opens a fresh MCP session to the remote server
  3. Calls the specified tool with the agent's arguments
  4. Returns the result to the agent

Credentials are never exposed to the agent.


Parameters

ParameterDescription
nameTool name the agent sees
credentialIdYour workspace's credential ID for the MCP server
toolNameTool name on the remote server (from belt mcp tools <slug>)

In agent YAML and stored tool JSON, the field is credential_id. Older configs may still use integration_id; the platform resolves either spelling to the same team credential.


Builder Methods

MethodDescription
mcpTool(name, credentialId, 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", "cred_xyz789", "send_message")3    .describe("Send a message to a Slack channel")4    .require_approval()5    .build()6)

Finding Credential IDs

After connecting to a server via belt mcp connect, find the credential ID:

bash
1belt credentials list2belt credentials get mcp:mcp.linear.app --json   # id field

Or in the web app under Mcps (/my/mcps) after connecting, or via GET /credentials/{provider}.


Finding Tool Names

List available tools on a connected server:

bash
1belt mcp tools linear
code
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", "cred_linear", "list_issues")6    .describe("List Linear issues for a project")7    .build()8)910get_issue = (11    mcp_tool("get_issue", "cred_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", "cred_linear", "create_issue")19    .describe("Create a new Linear issue")20    .require_approval()21    .build()22)2324notify_slack = (25    mcp_tool("notify_slack", "cred_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

we use cookies

we use cookies to ensure you get the best experience on our website. for more information on how we use cookies, please see our cookie policy.

by clicking "accept", you agree to our use of cookies.
learn more.