Skip to main content
Glama

create_semantic_model_from_schema

Validates a declarative schema and generates a TMDL semantic model, returning validation results for dry runs or atomically writing PBIP files for deployment.

Instructions

Generate a TMDL semantic model from a declarative spec.

Validates the spec (Pydantic + dangling-reference check + basic DAX lint) and either returns the validation result (dry_run=True) or atomically writes the PBIP layout (dry_run=False). Output contains tables_created, relationships_created, hierarchies_created and any lint_findings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dry_runNo
spec_jsonNo
spec_yamlNo
output_pbip_pathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden, and it discloses a good deal: the exact validation pipeline (Pydantic + dangling-reference check + basic DAX lint), the atomic write behavior, the two dry-run modes, and the output fields. It does not contradict any annotations. Minor gaps remain (e.g., failure behavior in write mode), but the core behavioral profile is well covered.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight paragraphs: the primary purpose is front-loaded and the second paragraph details behavior, mode selection, and output fields. Every sentence earns its place with no filler or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given an output schema exists, the return format is largely covered. The description fully explains the validation flow, the atomic write, and mode selection. It falls slightly short on clarifying input-format requirements and what happens on validation failure, but for a tool of this complexity with no annotations, it is substantially complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate. It explicitly explains dry_run ('returns the validation result (dry_run=True) or atomically writes (dry_run=False)') and implies output_pbip_path via the PBIP layout mention. However, it never directly clarifies the distinction between spec_json and spec_yaml (both are input spec formats) or what the output path expects, leaving two parameters only vaguely connected.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence states a specific verb ('Generate') and resource ('TMDL semantic model from a declarative spec'), and the second paragraph adds the validate-vs-write dual behavior. No sibling tool creates a semantic model from a spec, so it is implicitly distinguished from deploy, refresh, diff, and planning tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description conveys the two operational modes (dry_run=True validates and returns; dry_run=False atomically writes PBIP layout), which gives clear behavioral context. However, it never states when to prefer this tool over alternatives, when not to use it, or prerequisites like needing the spec in a particular format.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.