Tools Reference
Complete reference for all Semaphor MCP tools, their parameters, and responses.
Semaphor MCP exposes 12 tools organized into two categories: discovery and query. All tools accept a response_format parameter ("json" or "markdown") to control output formatting.
Interactive Sessions
For interactive (OAuth) sessions, semaphor_list_projects is available for project discovery. Pass the chosen projectId explicitly on each project-scoped tool call.
Discovery Tools
semaphor_get_analysis_context
Bootstrap tool for data questions. Call this first to determine the recommended discovery path (semantic or physical).
Parameters:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
projectId | string | No | From session | Project to analyze |
response_format | enum | No | "json" | "markdown" or "json" |
Response fields: projectId, recommendedPath, recommendedNextTool, guidance, semanticDomains, fallbackConnections
// Request
{ "name": "semaphor_get_analysis_context", "arguments": {} }
// Response (summarized)
{
"projectId": "p_abc123",
"recommendedPath": "semantic",
"recommendedNextTool": "semaphor_list_semantic_domains",
"semanticDomains": [
{ "id": "dom_abc", "name": "Sales Analytics", "datasetCount": 4 }
]
}semaphor_get_access_context
Returns the active MCP session context, including user identity, organization, and project scope.
Parameters:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
response_format | enum | No | "json" | "markdown" or "json" |
Response fields: actorType, userId, organizationId, projectId, tenantId, authMethod, sessionBound
// Response
{
"actorType": "organization",
"userId": "kp_abc123",
"organizationId": "org_xyz",
"projectId": "p_abc123",
"authMethod": "project-token",
"sessionBound": false
}semaphor_list_projects
Lists all projects accessible to the authenticated user.
Only available in interactive (OAuth) sessions. Not available in embedded (project-token) sessions.
Parameters:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
response_format | enum | No | "markdown" | "markdown" or "json" |
Response fields: Array of projects with id, name, description, owner, createdAt
Use the returned projectId values to pass on subsequent project-scoped tool calls.
semaphor_list_dashboards
Lists dashboards accessible to the authenticated user in a specific project.
Parameters:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
projectId | string | Yes | — | Project ID |
search | string | No | — | Search by title or description |
limit | integer | No | 100 | Max results (1-500) |
offset | integer | No | 0 | Pagination offset |
response_format | enum | No | "markdown" | "markdown" or "json" |
Response fields: Array of dashboards with id, title, description, createdAt, updatedAt
// Request
{
"name": "semaphor_list_dashboards",
"arguments": { "projectId": "p_abc123", "search": "sales" }
}semaphor_get_dashboard_details
Returns detailed information about a specific dashboard.
Parameters:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
dashboardId | string | Yes | — | Dashboard ID |
include_template | boolean | No | false | Include full dashboard configuration |
response_format | enum | No | "markdown" | "markdown" or "json" |
Response fields: id, title, description, sheets, cards, createdAt, updatedAt, and optionally template (full JSON configuration)
semaphor_list_semantic_domains
Lists semantic domains available in the project. Call this when the analysis context recommends the semantic path.
Parameters:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
projectId | string | No | From session | Project ID |
response_format | enum | No | "markdown" | "markdown" or "json" |
Response fields: Array of domains with id, name, description, connectionId, datasetCount
// Response
{
"domains": [
{
"id": "dom_abc",
"name": "Sales Analytics",
"description": "Customer orders and revenue data",
"connectionId": "conn_123",
"datasetCount": 4
}
]
}semaphor_list_datasets
Lists datasets within a semantic domain. Call this after semaphor_list_semantic_domains and before semaphor_get_dataset_schema.
Parameters:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
projectId | string | No | From session | Project ID |
domainId | string | Yes | — | Semantic domain ID |
response_format | enum | No | "json" | "markdown" or "json" |
Response fields: Array of datasets with name, label, description, type (physical or virtual)
// Request
{
"name": "semaphor_list_datasets",
"arguments": { "domainId": "dom_abc" }
}
// Response
{
"datasets": [
{ "name": "orders", "label": "Orders", "description": "Customer orders" },
{ "name": "customers", "label": "Customers", "description": "Customer profiles" }
]
}semaphor_get_dataset_schema
Returns columns for a semantic dataset or physical table. Supports two usage patterns.
Semantic mode (preferred): Pass domainId and datasetName.
Physical mode: Pass connectionId and tableName (with optional databaseName and schemaName).
Parameters:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
projectId | string | No | From session | Project ID |
domainId | string | No | — | Semantic domain ID (semantic mode) |
datasetName | string | No | — | Dataset name from list_datasets (semantic mode) |
connectionId | string | No | — | Connection ID (physical mode) |
connectionName | string | No | — | Connection name (physical mode, alternative to ID) |
databaseName | string | No | — | Database name (physical mode) |
schemaName | string | No | — | Schema name (physical mode) |
tableName | string | No | — | Table name (physical mode) |
includeCalculatedFields | boolean | No | true | Include calculated fields in results |
response_format | enum | No | "json" | "markdown" or "json" |
Response fields: Array of columns with name, label, type, fieldType (dimension or measure), description, aggregation
{
"name": "semaphor_get_dataset_schema",
"arguments": { "domainId": "dom_abc", "datasetName": "orders" }
}{
"name": "semaphor_get_dataset_schema",
"arguments": {
"connectionId": "conn_123",
"schemaName": "public",
"tableName": "orders"
}
}semaphor_list_connections
Lists database connections accessible in the active project. Use this only when the semantic path is unavailable.
Parameters:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
projectId | string | No | From session | Project ID |
response_format | enum | No | "json" | "markdown" or "json" |
Response fields: Array of connections with id, name, type (postgres, mysql, bigquery, etc.)
semaphor_get_domain_relationships
Returns join relationships between datasets in a semantic domain. Useful for multi-dataset queries.
Parameters:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
projectId | string | No | From session | Project ID |
domainId | string | Yes | — | Semantic domain ID |
response_format | enum | No | "json" | "markdown" or "json" |
Response fields: Array of relationships with sourceDataset, targetDataset, sourceField, targetField, joinType
{
"relationships": [
{
"sourceDataset": "orders",
"targetDataset": "customers",
"sourceField": "customer_id",
"targetField": "id",
"joinType": "many_to_one"
}
]
}Query Tools
semaphor_query_spec
Executes a Semaphor-native card-config query. Uses the same query engine as Semaphor dashboards. Respects all security policies (CLS, SLS, RLS).
Parameters:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
projectId | string | No | From session | Project ID |
chartTitle | string | No | — | Title for the query |
chartType | string | Yes | — | Chart type (e.g., "bar", "line", "table") |
connectionId | string | No | — | Connection ID (required for physical queries, auto-resolved for semantic queries) |
cardConfig | object | Yes | — | Card configuration with dimensions, metrics, filters |
cardDataSource | object | Yes | — | Data source (semantic domain or physical table) |
activeFilters | array | No | [] | Active filter objects |
response_format | enum | No | "json" | "markdown" or "json" |
Response fields: data (array of records), columns, rowCount, queryTime, sql (generated SQL)
{
"name": "semaphor_query_spec",
"arguments": {
"chartType": "table",
"connectionId": "conn_123",
"cardConfig": {
"dimensions": [{ "column": "region", "dataType": "string" }],
"metrics": [{ "column": "total_amount", "aggregation": "SUM" }]
},
"cardDataSource": {
"type": "semantic",
"domainId": "dom_abc",
"datasetName": "orders"
}
}
}semaphor_query_sql
Executes a SQL-first query for advanced analysis. Respects all security policies (CLS, SLS, RLS).
Parameters:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
projectId | string | No | From session | Project ID |
connectionId | string | Yes | — | Connection ID |
sql | string | Yes | — | SQL query to execute |
python | string | No | — | Python code for post-processing |
response_format | enum | No | "json" | "markdown" or "json" |
Response fields: data (array of records), columns, rowCount, queryTime
{
"name": "semaphor_query_sql",
"arguments": {
"connectionId": "conn_123",
"sql": "SELECT region, COUNT(*) AS orders, SUM(total_amount) AS revenue FROM orders GROUP BY region ORDER BY revenue DESC"
}
}Common Parameters
These parameters are shared across most tools:
| Parameter | Type | Default | Description |
|---|---|---|---|
response_format | "markdown" | "json" | Varies by tool | Output format |
projectId | string | From session or token | Project scope (optional on most tools) |