# Connector Tools

> Call tools on connected MCP servers as agent tools.

**URL:** https://inference.sh/docs/api/agent/connector-tools
**Last updated:** 2026-10-18

---

Call tools on connected MCP servers as agent tools.

---

## Basic Usage

<div data-type="codegroup">

```python Python
from inferencesh import mcp_tool

list_issues = (
    mcp_tool("list_issues", server="linear", tool_name="list_issues")
    .describe("List Linear issues with filtering and pagination")
    .build()
)
```

```typescript JavaScript
import { mcpTool } from '@inferencesh/sdk';

const listIssues = mcpTool('list_issues', { server: 'linear', toolName: 'list_issues' })
  .describe('List Linear issues with filtering and pagination')
  .build();
```

</div>

---

## 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](/docs/connectors/agent-tools#tool-schema-and-description).

**At call time**, when the agent invokes a connector tool:
1. Runtime loads the runner's own credential for the auth provider the server declares (`linear-mcp`); with none, the chat pauses and asks them to connect one
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

| Parameter | Description |
|-----------|-------------|
| `name` | Tool name the agent sees |
| `server` | MCP server slug (`linear`) |
| `toolName` / `tool_name` | Tool name on the remote server (from `belt mcp tools <slug>`) |

Each call signs in with the runner's own credential for the server's [auth provider](/docs/api/rest/auth-providers#mcp-resource-auth-providers): theirs, else their team's or org's. A tool doesn't pin a credential.

Python: `mcp_tool(name, *, server, tool_name)` (**inferencesh ≥ v0.32.0**). JavaScript: `mcpTool(name, { server, toolName })` (**@inferencesh/sdk ≥ v0.30.0**). Older SDKs also accepted `credential_id` / `credentialId`; the API ignores it.

In agent YAML and stored tool JSON the fields under `mcp` are `server` and `tool_name`.

---

## Builder Methods

| Method | Description |
|--------|-------------|
| `mcpTool(name, { server, 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:

<div data-type="codegroup">

```python Python
send_message = (
    mcp_tool("send_slack", server="slack", tool_name="send_message")
    .describe("Send a message to a Slack channel")
    .require_approval()
    .build()
)
```

```typescript JavaScript
const sendMessage = mcpTool('send_slack', { server: 'slack', toolName: 'send_message' })
  .describe('Send a message to a Slack channel')
  .requireApproval()
  .build();
```

</div>

---

## Finding Tool Names

List available tools on a connected server:

```bash
belt mcp tools linear
```

```
linear — 24 tools

tool                  description
list_issues           List issues with filtering and pagination
create_issue          Create a new issue
update_issue          Update an existing issue
...
```

Use the tool name from this listing as the `toolName` parameter.

---

## Full Example

<div data-type="codegroup">

```python Python
from inferencesh import mcp_tool

# Read-only tools
list_issues = (
    mcp_tool("list_issues", server="linear", tool_name="list_issues")
    .describe("List Linear issues for a project")
    .build()
)

get_issue = (
    mcp_tool("get_issue", server="linear", tool_name="get_issue")
    .describe("Get full details for a Linear issue")
    .build()
)

# Write tools — require approval
create_issue = (
    mcp_tool("create_issue", server="linear", tool_name="create_issue")
    .describe("Create a new Linear issue")
    .require_approval()
    .build()
)

notify_slack = (
    mcp_tool("notify_slack", server="slack", tool_name="send_message")
    .describe("Post a message to a Slack channel")
    .require_approval()
    .build()
)

all_tools = [list_issues, get_issue, create_issue, notify_slack]
```

```typescript JavaScript
import { mcpTool } from '@inferencesh/sdk';

const listIssues = mcpTool('list_issues', { server: 'linear', toolName: 'list_issues' })
  .describe('List Linear issues for a project')
  .build();

const getIssue = mcpTool('get_issue', { server: 'linear', toolName: 'get_issue' })
  .describe('Get full details for a Linear issue')
  .build();

const createIssue = mcpTool('create_issue', { server: 'linear', toolName: 'create_issue' })
  .describe('Create a new Linear issue')
  .requireApproval()
  .build();

const notifySlack = mcpTool('notify_slack', { server: 'slack', toolName: 'send_message' })
  .describe('Post a message to a Slack channel')
  .requireApproval()
  .build();

const allTools = [listIssues, getIssue, createIssue, notifySlack];
```

</div>

---

## Learn More

- [Connectors Overview](/docs/connectors/overview) — what connectors are and how they work
- [Browsing & Connecting](/docs/connectors/browsing) — set up connections to MCP servers
- [Agent Connector Tools](/docs/connectors/agent-tools) — YAML config and examples
