Skip to main content
Glama
Auto Ontology MCP

Auto Ontology MCP

by gogoymh

Save Sql Attribute

save_sql_attribute
DestructiveIdempotent

Creates, updates, certifies, or deletes a named SQL expression under a Term, executing it read-only first so broken SQL is rejected before saving.

Instructions

Create, update, certify or delete a named SQL expression under a Term. The expression is executed read-only against the database before it is saved, so a broken one is rejected with the error.

Input Schema

NameRequiredDescriptionDefault
kindNoType of expression.measure
nameYesTitle Case name, e.g. 'Net Revenue'.
termYesOwning Term name.
deleteNoDelete this SQL attribute.
statusNoSet certified only when a person approved it.
datasourceNoDatasource name. Optional when only one datasource is registered.
expressionNoSQL in the datasource dialect. measure/dimension/filter: a fragment over the Term's own table qualified by the bare table name (SUM(order_lines.line_total)). join/query: a full SELECT.
descriptionNoWhat it captures and when to use it.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and readOnlyHint=false, so the safety profile is covered. The description adds genuinely non-obvious behavior beyond that: the expression is executed read-only against the live database before persisting, and a broken one is rejected with the error — an agent needs to know saves can fail for SQL validity reasons. It does not say what delete removes or whether an existing attribute is overwritten on name match.

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 sentences, zero filler, with the operation set stated first and the validation consequence second. Nothing repeats the schema or the title.

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?

With an output schema, full annotation coverage and 100% parameter documentation, the description only needs to add operating context, which it largely does. The one real gap is the create-vs-update trigger: it says 'create, update' but never explains that an existing attribute under the same Term/name is replaced, which matters for a destructive, idempotent write.

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 description coverage is 100% and the schema already documents the dialect/expression shape per kind, the status approval rule, and the datasource fallback. The description adds no parameter-level meaning beyond the schema, so the baseline 3 applies.

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?

Names a specific resource ('named SQL expression under a Term') and the full set of operations it performs (create, update, certify, delete), which cleanly separates it from siblings like suggest_sql_attributes and validate_sql. An agent can tell it is the write path for persisting an expression, not the drafting or validation path.

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 four supported operations imply when the tool applies, but there is no explicit routing guidance — nothing tells the agent to draft with suggest_sql_attributes first, or to pre-check with validate_sql, or when to prefer this over update_term. The 'certified only when a person approved it' rule in the schema is the closest thing to a usage constraint, and it is not echoed in the description.

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