Skip to main content

Available MCP Tools

FunnelStory exposes the following tools through the MCP server.

ToolWhat it does
query_semantic_dbRun SQL queries against your workspace data
get_flowsList flows or retrieve a specific flow's configuration
configure_flowCreate or update a flow
run_flowExecute a flow and return its output
configure_data_modelCreate or update a data model configuration
preview_data_modelPreview query results and validate a data model before saving
read_resourceRead a resource document by URI (guides, schema, workspace profile)

query_semantic_db

Runs a SQL query against FunnelStory's semantic database — a structured view of your workspace data including accounts, metrics, predictions, activities, meetings, notes, tasks, tickets, and needle movers.

Your AI assistant can read the schema first (available as the file://semantic/schema.sql resource) to understand what tables and columns are available before querying.

Input:

FieldTypeDescription
querystringSQL query to run

get_flows

Returns flow metadata for the workspace. Pass a flow_id to get the full configuration of a specific flow — including its trigger, input schema, and graph. Omit it to get a summary list of all flows.

Input:

FieldTypeDescription
flow_idstring(Optional) ID of the flow to retrieve

configure_flow

Creates a new flow or updates an existing one. Pass flow_id to update; omit it to create. Flows saved with draft: true won't trigger automatically — useful while you're still building.

Read the file://flow/guide.md resource for the complete flow authoring reference.

Input:

FieldTypeDescription
flow_idstring(Optional) Flow to update; omit to create
namestringDisplay name
draftbooleanIf true, saves without publishing
trigger_configobjectWhen and how the agent runs — see Triggers
input_schemaarrayInput fields the flow accepts
configobjectFlow graph with entrypoint and steps

run_flow

Executes a flow by ID and waits for it to complete. If the flow sets a response variable, that value is returned to the caller.

Input:

FieldTypeDescription
flow_idstringID of the flow to run
inputobject(Optional) Input values, merged with flow defaults

configure_data_model

Creates or updates a data model in your workspace configuration. Use preview_data_model first to validate the query before saving.

Always read file://data_model/guide.md before calling this tool — it contains the full reference for supported model types, required mappings, and source-specific query patterns (HubSpot, Salesforce, databases).

Configure in the right order

For HubSpot, always configure models in this order: accounts → users → conversations/notes/activities. The user model must exist before engagement models can resolve account IDs.

Input:

FieldTypeDescription
idstring(Optional) ID of the model to update. Omit to create a new model.
namestringDisplay name for the model
typestringModel type: account, user, conversation, note, support_ticket, non_product_activity, product_activity, etc.
draftbooleanIf true, saves but does not activate. Defaults to true for new models.
data_sourceobjectQuery configuration — either data_connection_id + query, or dataset with name and query
mappingsarrayColumn-to-property mappings: [{"column": "...", "property": "..."}]
refreshobject(Optional) Refresh schedule, e.g. {"interval": "6h"}

preview_data_model

Validates a data model configuration by running the query and returning a sample of rows with resolved column types. Use this before configure_data_model to confirm the query returns the expected shape and that account_id values match your accounts model.

Input: Same shape as configure_data_model (without id).


read_resource

Reads a reference document by URI and returns its content. Use this to look up guides and schemas before configuring models or flows.

Available resources:

URIContents
file://data_model/guide.mdComplete guide for configuring data models — model types, required mappings, HubSpot and Salesforce query patterns, configuration order
file://flow/guide.mdComplete flow authoring reference — triggers, steps, variables, and examples
file://semantic/schema.sqlLive schema of your workspace's semantic database
file://semantic/usage.mdHow to interpret semantic database tables and values
file://workspace/profile.jsonYour workspace's connected data sources and active models

Input:

FieldTypeDescription
uristringURI of the resource to read

Next Steps