Skip to main content
Glama

Apply a schema sync

apply_schema_sync
Destructive

Create and update lists, indexes, write rules and flows to match a schema sync document. All or nothing: if any change would be refused, nothing is written and the plan says why. Run plan_schema_sync first and show the user the plan. With prune, it can also delete lists and indexes, so it needs confirmDestructive: true. Needs sync-schema plus the permission for each change; flows need a token that is allowed everything. Index builds it starts run in the background (wait_for_index). Suggest the user commits the document, so it can be deployed with jsonpad sync-schema. 1 request.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pruneNoAlso delete the lists and indexes this document's scope manages but no longer declares. Needs a scope
documentYesThe schema sync document: { "$schema": "https://jsonpad.io/schema/sync-v1.json", "scope": "my-app", "lists": { "<pathName>": { name, schema, rules, rulesTests, indexes: { "<pathName>": { pointer, valueType, ... } } } }, "flows": { ... } }. File references (rulesFile and so on) aren't supported: put the contents inline
allowRebuildNoAllow changes that rebuild an index in a list that has items (the index is unusable until it's rebuilt)
allowDestructiveNoAllow a prune to delete lists that have items, and guard indexes
confirmDestructiveNoConfirm a prune, which can delete lists and indexes (after showing the user the plan)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
appliedYes
changesNo
summaryNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, but the description adds substantial context beyond them: atomic all-or-nothing semantics ('if any change would be refused, nothing is written'), the exact permission requirements (sync-schema plus per-change permissions, flows need an all-permitted token), background index builds, and the jsonpad sync-schema deployment suggestion.

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?

Dense but front-loaded: the primary action and its atomicity come first, followed by prerequisites, then destructive-flag conditions. Every sentence carries actionable information with no filler.

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?

For a 5-parameter destructive mutation with an output schema, the description covers the prerequisite tool, permission model, destructive flag interplay, background execution, and failure semantics. The output schema handles return values, so nothing an agent needs is missing.

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 100%, so the baseline is 3. The description goes further by linking prune to the required confirmDestructive: true flag and describing the delete consequences of prune, adding cross-parameter meaning the schema doesn't convey. allowRebuild/allowDestructive remain schema-only, so it isn't a full 5.

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?

The description opens with a specific verb+resource: 'Create and update lists, indexes, write rules and flows to match a schema sync document.' That scope is clearly distinct from sibling tools like create_list or update_index (single-resource) and from plan_schema_sync (dry run).

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?

Explicitly routes to the alternative: 'Run plan_schema_sync first and show the user the plan.' It also gives conditional usage rules for prune (needs confirmDestructive: true) and points at wait_for_index for background index builds. Nothing is left to inference.

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