Skip to main content
Glama

Update table metadata

update_table
Idempotent

Add or update metadata about an entity — a table of rows, or a document. Use this to document what the entity is for, mark it ephemeral/transient, or point at a preferred alternative. The entity is the upsert key - if meaning is already attached to it, it is updated; otherwise it is created. WHAT THIS CALL CHANGES: only the fields you pass. Every field you omit keeps its current value - omitting a field never clears it, and the entity's extracted characteristics (relationship counts, temporal and size features) are left untouched by any edit here. Each field you do pass overwrites that field outright. SOME FACETS BELONG TO ONE SHAPE. table_type classifies a set of rows and is refused on an entity that answers with one document; grain says what one answer of a document represents and is refused on an entity that answers in rows. A facet that does not apply is absent rather than empty, because an empty facet would claim something that is not true. TO REMOVE metadata, call delete_table_metadata - passing an empty string or omitting a parameter will not erase anything. Example: update_table(entity='sessions', description='Transient session tracking', usage_notes='Do not use for analytics', is_ephemeral=true, preferred_alternative='billing_engagements'), or update_table(entity='google_ads.campaign_status', grain='one answer is one campaign, as of the moment it was read').

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": {
      "entity": "<entity>"
    },
    "name": "update_table"
  }
}

Input Schema

NameRequiredDescriptionDefault
grainNoOptional, document only - what one answer represents, in words: 'one campaign as of the moment it was read', 'one page of results'. A set of rows carries its grain in its own name, so this is refused there.
entityYesEntity to address: a table of rows or a document, named `schema.entity` (for example 'google_ads.campaign_status') or by its bare name when that is unambiguous in the datasource.
datasourceNoOptional datasource ID to target. Omit to use the project's configured default; required when the project has multiple datasources and no default is configured. Each datasource has its own SQL dialect: get_schema lists every datasource with its type, dialect and identifier quote, and every result carries datasource_type and dialect. A datasource that has not finished setup is refused with datasource_not_ready.
table_typeNoOptional, rows only - how this set of rows is used: 'transactional' (event/action), 'reference' (lookup), 'logging' (audit/history), 'ephemeral' (temporary), 'junction' (many-to-many). Refused on an entity that answers with one document, which says what it is through its grain.
descriptionNoOptional - What this entity represents and contains
usage_notesNoOptional - When to use or not use this entity in a request
is_ephemeralNoOptional - Mark as transient/temporary data not suitable for analytics
preferred_alternativeNoOptional - Entity to use instead if this one is ephemeral or deprecated

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior4/5

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

Goes well beyond the annotations (readOnlyHint=false, idempotentHint=true, destructiveHint=false) by explaining the upsert key semantics, that omitted fields are preserved rather than cleared, that each passed field is overwritten outright, and that extracted characteristics are untouched. Minor gap: it never says what happens if the entity name does not exist at all beyond 'it is created,' e.g. whether validation or auth constraints apply, but the partial-update contract is unusually well disclosed.

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 action and an explicit 'WHAT THIS CALL CHANGES' block, and the examples are genuinely illustrative of combinations rather than filler. It is long and the uppercase section headers plus the uppercased 'TO REMOVE' sentence border on verbose, but every paragraph carries distinct information.

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?

With no output schema and eight parameters, the description still covers creation-vs-update behavior, the preservation contract, per-shape applicability, removal routing, and a datasource note. An agent has everything needed to call it correctly or route elsewhere.

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 coverage is 100%, so the baseline is 3; the description earns above that by adding cross-parameter semantics the schema only implies separately: grain and table_type are mutually exclusive by entity shape, and a non-applicable facet is 'absent rather than empty.' The worked examples showing parameter combinations add concrete usage meaning.

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?

Opens with a specific verb+resource ('Add or update metadata about an entity') and immediately scopes the target as 'a table of rows, or a document.' It is clearly distinguishable from delete_table_metadata, which it names, and from the column-level update_column/update_columns siblings by operating on the entity itself.

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 explicit positive triggers (document purpose, mark ephemeral, point at an alternative) and an explicit negative route: 'TO REMOVE metadata, call delete_table_metadata - passing an empty string or omitting a parameter will not erase anything.' It also states when a facet is refused, which is guidance about applicability, not just mechanics.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources