> ## Documentation Index
> Fetch the complete documentation index at: https://langchain-5e9cc07a-preview-3rdpar-1767989943-c9a4f5f.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Tools

You can access a variety of tools in Agent Builder, including [built-in tools](#built-in-tools) and [tools from remote MCP servers](#remote-mcp-server-tools).

## Built-in tools

Use these built-in tools to give your agents access to email, calendars, chat, project management, code hosting, spreadsheets/BI, search, social, and general web utilities.

<Info icon="circle-info" color="#DCFCE7" iconType="regular">
  Google, Slack, Linear, GitHub, and LinkedIn use OAuth. Exa, Tavily, Pylon, and Twitter/X use workspace secrets (API keys).
</Info>

<CardGroup cols={2}>
  <Card title="Gmail" icon="google">
    Read and send email

    <ul>
      <li>Read emails (optionally include body, filter with search)</li>
      <li>Send email or reply to an existing message</li>
      <li>Create draft emails</li>
      <li>Mark messages as read</li>
      <li>Get a conversation thread</li>
      <li>Apply or create labels</li>
      <li>List mailbox labels</li>
    </ul>
  </Card>

  <Card title="Google Calendar" icon="google">
    Manage events

    <ul>
      <li>List events for a date</li>
      <li>Get event details</li>
      <li>Create new events</li>
    </ul>
  </Card>

  <Card title="Google Sheets" icon="google">
    Spreadsheets

    <ul>
      <li>Create spreadsheets</li>
      <li>Read ranges</li>
    </ul>
  </Card>

  <Card title="BigQuery" icon="database">
    Analytics

    <ul>
      <li>Execute SQL queries</li>
    </ul>
  </Card>

  <Card title="Slack" icon="slack">
    Send and read messages

    <ul>
      <li>Send a direct message to a user</li>
      <li>Post a message to a channel</li>
      <li>Reply in a thread</li>
      <li>Read channel history</li>
      <li>Read thread messages</li>
    </ul>
  </Card>

  <Card title="LinkedIn" icon="linkedin">
    Post to profile

    <ul>
      <li>Publish a post with optional image or link</li>
    </ul>
  </Card>

  <div style={{ position: 'relative', margin: 0, padding: 0 }}>
    <Card title="Twitter/X" icon="twitter">
      <ul>
        <li>Read a tweet by ID</li>
        <li>Read recent posts from a list</li>
      </ul>
    </Card>

    <div style={{ position: 'absolute', top: 16, right: 16 }}>
      <Tooltip tip="Required keys: TWITTER_API_KEY, TWITTER_API_KEY_SECRET">
        <Icon icon="key" size={16} />
      </Tooltip>
    </div>
  </div>

  <Card title="GitHub" icon="github">
    PRs, issues, and content

    <ul>
      <li>List pull requests</li>
      <li>Get pull request details</li>
      <li>Create issues and pull requests</li>
      <li>Comment on issues and pull requests</li>
      <li>Read repository files and list directories</li>
    </ul>
  </Card>

  <Card title="Linear" icon="list-check">
    Manage issues and teams

    <ul>
      <li>List teams and team members</li>
      <li>List issues with filters</li>
      <li>Get issue details</li>
      <li>Create, update, or delete issues</li>
    </ul>
  </Card>

  <Card title="Pylon" icon="list-check">
    Issue management

    <ul>
      <li>List issues</li>
      <li>Get issue details</li>
      <li>Update issues</li>
    </ul>
  </Card>

  <div style={{ position: 'relative', margin: 0, padding: 0 }}>
    <Card title="Search" icon="magnifying-glass">
      <ul>
        <li>Exa web search (optionally fetch page contents)</li>
        <li>Exa LinkedIn profile search</li>
        <li>Tavily web search</li>
      </ul>
    </Card>

    <div style={{ position: 'absolute', top: 16, right: 16 }}>
      <Tooltip tip="Exa: EXA_API_KEY; Tavily: TAVILY_API_KEY">
        <Icon icon="key" size={16} />
      </Tooltip>
    </div>
  </div>

  <Card title="Web utilities" icon="globe">
    <ul>
      <li>Read webpage text content</li>
      <li>Extract image URLs and metadata</li>
      <li>Notify user (for confirmations/updates)</li>
    </ul>
  </Card>
</CardGroup>

## Remote MCP server tools

An [*MCP (Model Context Protocol) server*](https://modelcontextprotocol.io/docs/getting-started/intro) exposes tools that an agent can call at runtime.

A remote MCP server:

* Runs outside of LangSmith (usually over HTTPS).
* Owns its own authentication and authorization.
* Acts as a bridge between your agent and an external system.

LangSmith Agent Builder doesn’t execute these tools itself—it forwards requests to the MCP server and returns the results to the agent.

### How it works

* Agent Builder discovers tools from remote MCP servers via the standard MCP protocol.
* Headers configured in your workspace are automatically attached when fetching tools or calling them. Headers are key-value pairs sent with every HTTP request to your MCP server. They're commonly used for authentication (like API keys or bearer tokens), but can also provide configuration information, content types, or custom metadata.
* Tools from remote servers are available alongside built-in tools in Agent Builder.

**Runtime**: Agent Builder automatically connects to your MCP server and uses its tools.

```mermaid theme={null}
sequenceDiagram
    participant Agent as Agent Builder
    participant MCP as Remote MCP Server

    Agent->>MCP: Discover available tools<br/>(with configured headers)
    MCP-->>Agent: Return tool list

    Note over Agent,MCP: Later, when agent needs a tool...

    Agent->>MCP: Call tool<br/>(with configured headers)
    MCP-->>Agent: Return result
```

The following sections show you how to connect a remote MCP server to Agent Builder:

* [General configuration](#general-configuration): Step-by-step instructions for connecting any remote MCP server with authentication headers. Use this if you're familiar with MCP servers and want a quick reference.
* [Example: Connecting a custom MCP server](#example-connecting-a-custom-mcp-server): A detailed walkthrough using a GitHub-based MCP server as an example. Use this if you want to see a complete end-to-end example with specific authentication details.

### General configuration

Configure remote MCP servers in your LangSmith [workspace](/langsmith/administration-overview#workspaces):

<Steps>
  <Step title="Navigate to MCP Server settings">
    In the [LangSmith UI](https://smith.langchain.com), select **Settings** in the lower left corner, then choose **MCP Servers** from the left-hand navigation.
  </Step>

  <Step title="Add your MCP server">
    Click **Add server** and enter the URL of your remote MCP server (for example, `https://mcp.example.com`).
  </Step>

  <Step title="Configure authentication headers (if required)">
    If your MCP server requires authentication, add headers to authenticate requests. The most common pattern is using an Authorization bearer token:

    * **Key**: `Authorization`
    * **Value**: `Bearer {{SECRET_NAME}}`

    **How it works:**

    * The `{{SECRET_NAME}}` placeholder references a [workspace secret](/langsmith/agent-builder-setup#add-workspace-secrets) that stores your actual token value.
    * At runtime, Agent Builder automatically replaces `{{SECRET_NAME}}` with the secret's value.
    * The header is attached to all requests to your MCP server.

    **Example:**
    If you have a workspace secret named `MCP_TOKEN` with value `sk_abc123xyz`, configure:

    * Key: `Authorization`
    * Value: `Bearer {{MCP_TOKEN}}`

    Agent Builder will send: `Authorization: Bearer sk_abc123xyz`

    <Tip>
      For instructions on adding workspace secrets, refer to [How to add workspace secrets](/langsmith/agent-builder-setup#how-to-add-workspace-secrets).
    </Tip>

    <Info>
      You can add multiple headers if your MCP server requires additional authentication or configuration parameters. Each header key-value pair is sent with every request to the server.
    </Info>
  </Step>

  <Step title="Save and verify">
    Save your configuration. Agent Builder will automatically discover available tools from your MCP server and make them available in your agents. The configured headers are applied to both tool discovery requests and tool execution requests.
  </Step>
</Steps>

<Note>
  Always use workspace secret placeholders (e.g., `{{MCP_TOKEN}}`) rather than hardcoding sensitive values directly in headers. Secrets are stored securely and resolved at runtime.
</Note>

### Update your MCP server URL

<Warning>
  Changing the URL of a custom MCP server will break any agents that use tools from that server.
</Warning>

Agent Builder stores tool references by MCP server URL. If you update the URL of a custom MCP server, existing agents will fail when attempting to call those tools because the stored URL no longer matches.

To update an MCP server URL:

1. Update your MCP server URL in the workspace settings.
2. For each agent using tools from that server:
   * Remove the affected tools from the agent configuration.
   * Re-add the tools (they will now reference the new URL).
3. Test the agent to confirm tools work correctly.

### Example: Connect a custom MCP server

Here's a practical example of connecting Agent Builder to a GitHub MCP server that requires authentication:

<Steps>
  <Step title="Create a GitHub Authorization Token">
    The MCP server needs permission to access GitHub on your behalf. You’ll do this using a **GitHub Personal Access Token (PAT)**.

    1. Go to **GitHub → Settings → Developer settings**.
    2. Open **Personal access tokens**.
    3. Create a **Fine-grained token** (recommended).

    Grant **read-only** permissions:

    * **Contents**: Read
    * **Issues**: Read
    * **Pull requests**: Read

    Once created, **copy the token**. You won’t be able to see it again.

    <Tip>Treat this token like a password. You can rotate or revoke it at any time without changing your agent.</Tip>
  </Step>

  <Step title="Understand the required headers">
    Remote MCP servers typically authenticate using HTTP headers.

    For the GitHub MCP server, the required headers look like this:

    ```http theme={null}
    Authorization: Bearer ghp_xxxxxxxxxxxxxxxxxxxx
    Content-Type: application/json
    User-Agent: langsmith-agent-builder
    ```

    * Authorization proves who you are.
    * The MCP server validates the token.
    * Every tool call from the agent includes these headers.

    Agent Builder will attach these headers automatically once configured.
  </Step>

  <Step title="Store the token as a workspace secret">
    In the [LangSmith UI](https://smith.langchain.com):

    1. Navigate to **Settings** > **Workspaces** > **Secrets**.
    2. Click **Add secret**.
    3. Name: `GITHUB_TOKEN` (or any descriptive name).
    4. Value: Your authentication token.
    5. Save the secret.
  </Step>

  <Step title="Configure the MCP server">
    In **Settings** > **MCP Servers**:

    1. Click **Add server**.
    2. Add a **Name** for the MCP server.
    3. **URL**: Enter your MCP server URL (e.g., `https://mcp-github.example.com`)
    4. Add authentication header:
       * Key: `Authorization`
       * Value: `Bearer {{GITHUB_TOKEN}}`
    5. Save the configuration.
  </Step>

  <Step title="Use tools in your agent">
    The tools from your MCP server are now available in Agent Builder. When you create or edit an agent, you'll see these tools alongside the built-in tools. All requests to your MCP server will include the authentication header automatically.

    Once connected, the workflow for this example looks like this:

    1. The agent decides it needs GitHub data.
    2. It selects a tool exposed by the MCP server.
    3. LangSmith forwards the request to the remote MCP server.
    4. The server authenticates using your token.
    5. GitHub data is fetched and returned.
    6. The agent receives structured results and continues reasoning.
  </Step>
</Steps>

<Info>
  Different MCP servers may use different authentication methods:

  * `Authorization: Bearer {{TOKEN}}` (most common)
  * `X-API-Key: {{API_KEY}}`
  * Custom headers specific to your implementation
  * Multiple headers for authentication

  Always check your MCP server's documentation for the correct authentication header format.
</Info>

***

<Callout icon="pen-to-square" iconType="regular">
  [Edit this page on GitHub](https://github.com/langchain-ai/docs/edit/main/src/langsmith/agent-builder-tools.mdx) or [file an issue](https://github.com/langchain-ai/docs/issues/new/choose).
</Callout>

<Tip icon="terminal" iconType="regular">
  [Connect these docs](/use-these-docs) to Claude, VSCode, and more via MCP for real-time answers.
</Tip>
