Skip to main content
Glama

Repair a saved query's column metadata

repair_query_metadata
Idempotent

Re-introspect and refresh a saved query's column metadata after schema changes, leaving SQL and datasource untouched. Reports stored-vs-live diff by default; apply writes refreshed metadata.

Instructions

Re-introspect and store a saved query's COLUMN METADATA without touching its SQL or datasource binding — safe by construction (name/datasources/raw_sql/sql_form are re-sent verbatim; only columns is refreshed from a live execution). Stale stored metadata makes bound blocks render blank/wrong after schema or version moves; migration_preflight flags it as stored_metadata_stale. Dry-run by default: reports the stored-vs-live diff; pass apply:true to write. Round-trip verifies the write and mirrors it to version control.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
applyNoWrite the refreshed metadata (default false = report the diff only).
paramsNoParameters for a parameterized query, as a { name: value } map.
query_idYesSaved query UUID.
Behavior5/5

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

Annotations already declare idempotent and non-destructive; the description adds depth: re-sends other fields verbatim, dry-run by default, apply:true required to write, round-trip verification, and version-control mirroring. No contradiction with annotations.

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?

Three sentences, each serving a distinct purpose: action, rationale, behavior. It's front-loaded and efficient, though slightly dense; a minor tightening would make it a 5.

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?

Complete for an agent: explains what it does, when to use it, how to invoke the write (apply:true), and what to expect (diff report, write verification). Lacks explicit output schema but the description provides enough for correct invocation.

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 covers all 3 params with descriptions, so baseline is 3. The description adds value by clarifying the dry-run semantics of apply (default false) and that params is for parameterized queries, enhancing the schema.

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?

Clearly states the action (re-introspect and store column metadata) and the resource (saved query), and explicitly enumerates what it does NOT touch (SQL, datasource binding). This scoping differentiates it from sibling tools without naming them.

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

Usage Guidelines4/5

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

Provides a concrete trigger condition (migration_preflight flags stale metadata) and explains the dry-run/apply workflow. It implies when not to use it (when you need to change SQL or datasource) but doesn't explicitly name alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zuarbase/Zuar-Portal-MCP-Public'

If you have feedback or need assistance with the MCP directory API, please join our Discord server