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:
ColumnPurpose
LeftSQL editor (Monaco) for writing the query
CenterParameter designer for defining inputs
RightPreview panel with execution results and code output

Writing SQL Queries

Use :param_name to define query parameters:
SELECT *
FROM users
WHERE status = :status
  AND created_at >= :start_date
LIMIT :limit
Parameters are automatically detected from the query text and appear in the center column for configuration.

Parameter Designer

Each detected parameter can be configured:
FieldDescription
NameAuto-detected from :name in SQL
Typestring, integer, number, or boolean
RequiredWhether the client must provide this parameter
DefaultDefault value if not supplied
Enum ValuesRestrict input to allowed values (comma-separated)
DescriptionHuman-readable description shown to MCP clients

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

FieldDescription
NameTool identifier (used by MCP clients to call the tool)
DescriptionWhat the tool does (shown to LLMs for tool selection)
TagsCategorical labels for organization
Cache TTLHow long results are cached (in seconds, 0 = no cache)

Annotations

Annotations provide safety hints to MCP clients:
AnnotationDescription
read_onlyTool only reads data
destructiveTool may delete or alter data
open_worldTool interacts with external systems
idempotentRepeated calls produce the same result

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

ShortcutAction
Ctrl+SSave the current tool
Ctrl+EnterRun preview execution

See Also