Skip to main content
Glama
Auto Ontology MCP

Auto Ontology MCP

Import semantic layer document

import_ontology
DestructiveIdempotent

Imports an exported YAML or JSON semantic layer into an already scanned datasource, matching tables and columns by name and skipping missing or invalid items.

Instructions

Import a YAML or JSON semantic layer document produced by export_ontology into an already scanned datasource, matching tables and columns by name. Prerequisite: register and scan the target datasource first with add_datasource or scan_datasource; use save_table_terms or update_term for incremental single-table edits. Upserts same-named items and replaces each imported table's Terms as in save_table_terms; items with missing tables, columns, or invalid SQL are skipped and listed (partial apply). Recreates missing knowledge entities empty without importing record rows.

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": {
      "document": "<document>"
    },
    "name": "import_ontology"
  }
}

Input Schema

NameRequiredDescriptionDefault
documentYesYAML or JSON ontology document previously produced by export_ontology.
datasourceNoDatasource name. Optional when only one datasource is registered.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.6.2
    • changedInput schema / properties / document / description
      Previous value: -"A document produced by export_ontology."New value: +"YAML or JSON ontology document previously produced by export_ontology."
  2. First observedv0.3.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and idempotentHint=true, and the description adds the concrete consequences: upserts same-named items, replaces each imported table's Terms, and recreates missing knowledge entities empty without importing record rows. It also discloses failure semantics — items with missing tables, columns, or invalid SQL are skipped and listed, i.e. a partial apply — which is exactly the information an agent needs before a destructive import.

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

Conciseness4/5

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

Front-loaded with the core action and prerequisite, and every sentence carries distinct information (scope, prerequisite, alternative, side effects, partial-apply failure mode). It is dense — three long semicolon-chained sentences — which slightly taxes first-pass parsing but wastes no words.

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

Completeness5/5

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

Covers everything needed for a destructive, idempotent import: prerequisite state, matching rules, upsert/replace semantics, and skip-and-report behavior on failure. An output schema exists, so return values need not be explained, and nothing an agent needs to invoke this safely appears to be missing.

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 100%, so both parameters are already documented, including that datasource is optional when only one is registered. The description adds only the "already scanned datasource" framing and the name-matching behavior; it does not add format, size, or syntax guidance beyond the schema. Baseline 3 applies when the schema carries the parameter burden.

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?

States a specific verb and resource ("Import a YAML or JSON semantic layer document produced by export_ontology into an already scanned datasource") and names the matching scope (matching tables and columns by name). It is clearly the inverse of export_ontology and is distinguished from save_table_terms and update_term, which the description explicitly routes incremental edits to.

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

Usage Guidelines5/5

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

Gives an explicit prerequisite ("register and scan the target datasource first with add_datasource or scan_datasource") and an explicit alternative for a different case ("use save_table_terms or update_term for incremental single-table edits"). When-to-use, when-not-to-use, and named alternatives are all present.

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