MCP Tools
MCP Tools are callable functions that let agents interact with your semantic layer. Unlike Resources, which are read-only, tools accept parameters and return computed results.
Available tools
Section titled “Available tools”context_search
Section titled “context_search”Search across models, fields, glossary terms, and business rules by keyword or natural-language query.
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | The search term or natural-language question |
Example use: An agent receives the question “What is our monthly churn rate?” and calls context_search with query: "churn rate" to find relevant models and metrics.
context_explain
Section titled “context_explain”Returns a plain-language explanation of a model, field, or glossary term, including its business context, relationships, and usage notes.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | The identifier of the model, field, or term to explain |
Example use: An agent calls context_explain with name: "orders.net_revenue" to understand what net_revenue means, how it is calculated, and how it relates to other fields.
context_validate
Section titled “context_validate”Validates a proposed SQL query or expression against the semantic layer, checking for correct joins, appropriate grain, and adherence to business rules.
| Parameter | Type | Required | Description |
|---|---|---|---|
sql | string | Yes | The SQL query or expression to validate |
Example use: Before returning a generated query to the user, the agent calls context_validate to confirm the query respects the defined grain and does not violate any guardrails.
context_tier
Section titled “context_tier”Returns the current tier status and scorecard, showing which rules pass and which require attention.
| Parameter | Type | Required | Description |
|---|---|---|---|
tier | string | No | The tier level to check (bronze, silver, gold). Defaults to the highest achieved tier. |
Example use: An agent calls context_tier with tier: "gold" to see which Gold-level requirements are not yet met.
context_golden_queries
Section titled “context_golden_queries”Returns the golden queries defined for a model. Golden queries are curated, known-correct SQL examples that demonstrate proper usage of the model.
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | The model identifier |
Example use: An agent calls context_golden_queries with model: "orders" to retrieve reference SQL it can adapt for the user’s question.
context_guardrails
Section titled “context_guardrails”Returns the guardrails defined for a model. Guardrails are SQL-based constraints that generated queries should respect — for example, always filtering by a specific date range or never aggregating non-additive measures incorrectly.
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | The model identifier |
Example use: An agent calls context_guardrails with model: "orders" to learn that queries against the orders model must always include a WHERE order_date >= ... filter.