PromptRails

MCP Tools

Give agents safe access to integrations, databases, APIs, media providers, built-in utilities, and remote MCP servers.

PromptRails uses MCP tools to let agents take action outside the model call. A tool can query a database, call an integration, make an HTTP request, generate media, use a built-in utility, or connect to a remote MCP server.

Tools are created and attached from Studio beside the agents and prompts that use them. The tool detail view shows the tool type, configuration, and versioned behavior.

What is MCP?

The Model Context Protocol is an open standard for connecting LLMs to external tools and data sources. MCP defines how tools are discovered, described, and invoked, creating a uniform interface between AI agents and the services they interact with.

In PromptRails, MCP tools are workspace resources that can be attached to agents. When the model chooses a tool, PromptRails validates the parameters, runs the tool, formats the result, and records the call in the trace.

Technical detailsTool type reference

Tool Types

PromptRails supports six types of MCP tools:

Integration Tools (integration)

Integration tools connect to 27+ third-party services through the PromptRails integration service. Each integration provides a set of pre-built tools discovered via the MCP protocol.

Supported integrations:

CategoryServices
GoogleAnalytics, Search Console, Ads, Drive, Docs, Sheets, Slides, Gmail
CRMHubSpot, Salesforce, Pipedrive
Lead GenerationApollo.io
AccountingStripe, Xero, QuickBooks
Issue ManagementJira, Confluence, Linear, Trello, Notion
DevelopmentSentry, Figma, Supabase, GitHub
CommunicationSlack, Telegram, Resend

Integration tools are installed from the MCP Template Marketplace. Each template handles credential setup, tool discovery, and configuration automatically.

Google integrations support both OAuth2 and Service Account authentication, including domain-wide delegation with user impersonation.

Data Source Tools (datasource)

Data source tools execute SQL queries against connected databases. They support dynamic queries — the agent writes the SQL at runtime.

Supported databases: PostgreSQL, MySQL, BigQuery, Snowflake, Redshift, MSSQL, ClickHouse

Install database tools from the template marketplace by selecting an existing database credential. The tool provides three actions:

  • query — Execute SQL queries
  • list_tables — List all tables in the database
  • describe_table — Get column details for a table

Media Tools (media)

Media tools generate speech, images, and video through AI providers.

CategoryProviders
Text to SpeechElevenLabs, Deepgram
Speech to TextDeepgram
Image GenerationFal (FLUX), Replicate, Stability AI
Video GenerationRunway, Pika, Luma Dream Machine

Media tools use workspace-level credentials configured in Settings > Credentials.

API Tools (api)

API tools make HTTP requests to external REST APIs. You define the endpoint, method, headers, and parameter mapping.

Built-in Tools (builtin)

Built-in tools provide predefined functionality that runs within the PromptRails platform:

  • State Manager — Store and retrieve key-value state during agent execution
  • Math Calculator — Perform mathematical calculations
  • Date & Time — Get current date and time in UTC

Remote MCP Tools (remote_mcp)

Remote MCP tools connect to external MCP servers that implement the full MCP protocol. This allows you to use tools from any MCP-compatible server.

MCP Template Marketplace

The template marketplace provides one-click installation for all supported integrations. Each template includes:

  • Pre-configured tool definitions
  • Credential setup with parameter validation
  • Setup instructions for the service
  • Automatic tool discovery
The MCP Template Marketplace gives teams a maintained starting point for common tools and integrations, with templates grouped by provider and setup path.

To install a template:

  1. Go to MCP Templates in your workspace
  2. Find the integration you want
  3. Enter the required credentials (API key, OAuth tokens, or Service Account)
  4. Click Install

The tool is created with all discovered sub-tools (e.g., installing HubSpot gives you hubspot_search_contacts, hubspot_create_deal, etc.).

Technical detailsSchema, discovery, and invocation details

Tool Schema

Each tool defines a JSON schema describing its parameters. This schema is provided to the LLM so it understands what parameters are available:

{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "description": "The search query"
    },
    "max_results": {
      "type": "integer",
      "description": "Maximum number of results",
      "default": 10
    }
  },
  "required": ["query"]
}

Adding Tools to Agents

Tools are linked to agents through the agent version configuration in the UI or API. Any tool type can be attached to any agent type.

Tool Discovery

For integration and remote MCP tools, PromptRails discovers available sub-tools from the service. You can view and test discovered tools on the tool detail page under the Test tab.

Tool Status

StatusDescription
activeTool is available for use
inactiveTool is disabled but not removed
errorTool encountered a connection error
archivedTool is permanently disabled

Tool Invocation Flow

When an agent executes and the LLM decides to call a tool:

  1. The LLM generates a tool call with parameters
  2. PromptRails validates the parameters against the tool schema
  3. The tool is invoked (API call, database query, MCP request, etc.)
  4. Results are returned to the LLM for incorporation into the response
  5. The entire tool call is recorded as an mcp_call trace span
  • Integrations — Browse all 50+ supported integrations
  • Agents — Attaching tools to agents
  • Credentials — Authentication for tool endpoints
  • MCP Server — PromptRails as an MCP server for IDEs
  • Tracing — Tool calls appear as tool and mcp_call spans