Skip to main content
Glama

ingest_source_table

Validates Excel/CSV source tables against an expected schema, then stages rows and TMDL artifacts into a PBIP semantic model; supports dry-run key, duplicate, and row-limit checks.

Instructions

Validate and stage an Excel/CSV source table into a PBIP semantic model.

Args: source_path: Path to source .xlsx/.xlsm/.csv file inside PBI_WORKSPACE_ROOT. target_pbip_dir: Path to target PBIP workspace directory. table_name: Validated target Power BI table identifier. expected_schema: Dict (or JSON string) mapping column names to expected types. sheet_name: Optional Excel worksheet name. key_columns: Optional key columns checked for nulls and duplicates. allow_extra_columns: Permit unmapped source columns when True. max_rows: Safety row cap per file (capped at 100,000). dry_run: Validate only without writing TMDL/staged CSV files (default True).

Returns: Dict with schema/key validation findings, row counts, and staged artifacts.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "source_path": "<source_path>",
      "target_pbip_dir": "<target_pbip_dir>",
      "table_name": "<table_name>",
      "expected_schema": "<expected_schema>"
    },
    "name": "ingest_source_table"
  }
}

Input Schema

NameRequiredDescriptionDefault
dry_runNo
max_rowsNo
sheet_nameNo
table_nameYes
key_columnsNo
source_pathYes
expected_schemaYes
target_pbip_dirYes
allow_extra_columnsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.25.1

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full behavioral burden. It usefully discloses that dry_run defaults to True and validates without writing TMDL/staged CSV files, that max_rows is capped at 100,000, and that key_columns are checked for nulls and duplicates. However, it does not state whether non-dry-run writes overwrite existing files or tables, what permissions are required, or how validation failures are handled.

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?

The description is front-loaded with the core purpose, then uses a clean Args/Returns structure that is appropriate for a nine-parameter tool. There is no filler, and the parameter list is easy to scan.

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?

For a complex nine-parameter ingestion tool with no annotations, the description covers the purpose, every parameter, the validation/staging behavior, and the return shape. It is complete enough to invoke correctly, though it leaves out usage routing versus siblings and some write-safety details such as overwrite behavior and failure handling.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must supply parameter meaning, and it does document all nine parameters with useful constraints: source_path must be inside PBI_WORKSPACE_ROOT, expected_schema may be a dict or JSON string, key_columns are checked for nulls and duplicates, allow_extra_columns controls unmapped columns, max_rows has a 100,000 cap, and dry_run defaults to True. The remaining gap is that exact type names for expected_schema and the validation rules for table_name are not specified.

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

Purpose4/5

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

The description states a specific verb and resource: 'Validate and stage an Excel/CSV source table into a PBIP semantic model.' That is clear enough to distinguish it from generic model-creation or refresh tools, but it does not explicitly differentiate itself from siblings such as create_semantic_model_from_schema.

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

Usage Guidelines2/5

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

The description explains what the tool does but gives no explicit when-to-use, when-not-to-use, or alternative guidance. It does not say when an agent should choose ingest_source_table over create_semantic_model_from_schema or other sibling tools, so usage must be inferred from the purpose sentence alone.

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