Skip to main content
Tools are the primary way MCP clients interact with your data. Each tool wraps a SQL query with typed parameters, metadata, and safety annotations.

Tool Builder Layout

The tool builder uses a 3-column layout:

Writing SQL Queries

Use :param_name to define query parameters:
Parameters are automatically detected from the query text and appear in the center column for configuration.

Parameter Designer

Each detected parameter can be configured:

SQL Preview

The right column includes a Preview tab for test-executing your query:
  1. Fill in test values for each parameter
  2. Click Run Preview
  3. Results display in a table format
Preview queries execute in read-only mode with an automatic LIMIT applied.

Tool Metadata

Annotations

Annotations provide safety hints to MCP clients:

Transform Templates (Jinja2)

Optionally add a post-processing template to transform SQL results before they reach MCP clients. The transform editor appears below the SQL editor and is collapsible.

Template Context

Built-in Filters

Standard Jinja2 built-ins are also available: sum, len, min, max, round, sorted, enumerate, zip, range.

Example: Sum and Count

Example: Filter and Restructure

Example: Use Global Variables

Preview with Transforms

When a transform template is set, the preview panel shows two tabs:
  • Raw - SQL query results as-is
  • Transformed - results after applying the template
Transform errors appear as warnings without blocking the raw results.
Templates run in a sandboxed environment with a 10 MB output limit. Unsafe operations (file access, imports, class introspection) are blocked.

Code Preview

The Code tab shows the generated Python code that will run inside the deployed FastMCP server. This is read-only and updates automatically.

Connection Binding

Each tool must be bound to a database connection. Select the connection from the dropdown at the top of the tool builder.

Duplicating Tools

Open a tool and click Duplicate to create a copy with the name <original>_copy.

Keyboard Shortcuts


See Also

Connections

Create and manage the database connections that tools query against

Resources

Expose data as readable MCP resources with URI templates

Prompts

Design reusable prompt templates for LLM interactions

Flow Editor

Manage tools visually on the drag-and-drop canvas

Deployment

Deploy your tools as a running MCP server

REST API

Tool CRUD endpoints in the REST API