Get Semantic Model

Fetch the full definition of a semantic model by ID — its tables, business questions, custom SQL instructions, and status — for programmatic introspection or agent context-loading.

When you need to inspect a semantic model's structure programmatically — or load its metadata into an agent's context before running a query — get_semantic_model returns the complete definition in a single call.

What it does

get_semantic_model takes a semantic model's UUID and returns its full definition: tables it is built on, business questions it is designed to answer, custom SQL generation instructions, owner, status, confidence level, and when it was last updated.

Use it when:

  • You want to show a user which tables and metrics a model covers before they ask a question
  • Your agent needs to verify a model is certified and active before passing its ID to text2sql
  • You're building a UI that surfaces model metadata directly

For generating SQL, use text2sql directly — it selects a model automatically when no ID is provided, and validates model status itself. For asking a natural-language question about a model, use semantic_model_qa instead.

Parameters

ParameterRequiredDescription
semantic_layer_idYesThe full 36-character UUID of the semantic model (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). Get it from the certified semantic layers resource, or from your Solid admin. Pass the complete value — do not truncate or shorten it.

Example

semantic_layer_id: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"

What a good response looks like:

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "name": "Revenue & Orders",
  "short_description": "Core revenue and order metrics across all channels.",
  "description": "Covers orders, revenue, refunds, and regional breakdowns from Q1 2024 onward.",
  "business_questions": [
    "What is total revenue by region this quarter?",
    "How many orders were placed last month?"
  ],
  "tables": ["edw.mart.orders", "edw.mart.regions", "edw.mart.refunds"],
  "source_system": "snowflake",
  "status": "certified",
  "confidence": 0.92,
  "custom_instructions": "Always filter by fiscal year, not calendar year.",
  "owner": "[email protected]",
  "validation_messages": [],
  "updated_at": "2026-09-10T14:32:00Z"
}

Errors

Error conditionWhat it means
Invalid UUID formatThe semantic_layer_id is not a valid 36-character UUID. Check for truncation or missing hyphens.
Unknown IDThe UUID is valid but does not match any model in your workspace. Verify the ID with your Solid admin.

In the agent workflow

get_semantic_model fits naturally before a text2sql call when you want to confirm model status or surface its metadata to the user:

get_semantic_model(id) → confirm status = "certified"
         │
         ▼
text2sql(question, semantic_layer_ids=[id])
         │
         ▼
Agent executes SQL → answer returned to user

For most use cases, skipping the pre-check is fine — text2sql validates model status automatically and returns a structured error if the model is inactive, deleted, or not found. See Getting Started with the Solid MCP Server for the full list of available tools and error codes.


Did this page help you?