Skip to main content
Glama

Update Graph Schema

update_graph_schema
DestructiveIdempotent

Replace a graph project's WHOLE schema (saves to database, does NOT deploy). DESTRUCTIVE: an entity, relationship or field the schema leaves out is deleted by the next deploy.

⚠️ Follow ALL rules from create_graph_project: • Must have "nodes" key with at least one entity • Each entity needs "description" and "schema" with field definitions • Each field is {"type": "...", "required": true/false} — required defaults to false • Relationships need "from", "to", and "cardinality" • Field types: string, integer, float, boolean, date, json • Relationship types should be UPPER_SNAKE_CASE • Entity names should be PascalCase

WORKFLOW:

  1. get_graph_schema to see the current schema (its 'version' pins the save)

  2. preview_schema_change with the new schema: check 'diff' and 'plan'

  3. update_graph_schema (pass expected_version to be refused if someone else saved meanwhile)

  4. deploy_graph_staging, then get_job_status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
schemaYesNew graph schema with 'nodes' and optionally 'relationships' keys — the WHOLE schema.
project_idYesProject ID (UUID)
expected_versionNoThe 'version' a get_graph_schema read answered. The save is refused (409) when the saved schema changed since.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • removedInput schema / properties / dry_run
      Removed value: -{
      -  "description": "Preview the planned migration (renames/deletions) without saving or deploying. Nothing is applied.",
      -  "type": "boolean"
      -}
    • addedInput schema / properties / expected_version
      Added value: +{
      +  "description": "The 'version' a get_graph_schema read answered. The save is refused (409) when the saved schema changed since.",
      +  "type": "string"
      +}
    • changedInput schema / properties / schema / description
      Previous value: -"New graph schema with 'nodes' and optionally 'relationships' keys."New value: +"New graph schema with 'nodes' and optionally 'relationships' keys — the WHOLE schema."
  2. Changed1 schema field changed
    • addedInput schema / properties / dry_run
      Added value: +{
      +  "description": "Preview the planned migration (renames/deletions) without saving or deploying. Nothing is applied.",
      +  "type": "boolean"
      +}
  3. Added

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already mark this as destructive (destructiveHint=true) and not read-only, but the description adds critical detail: omitted entities/relationships/fields are deleted by the next deploy, and the save does not deploy. It also explains the expected_version 409 refusal behavior. This goes well beyond the annotation profile and gives the agent the consequences it needs.

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?

The destructive warning is front-loaded, followed by a tight rule list and a numbered workflow. Despite covering a complex nested-schema operation, every sentence is actionable and no filler is present. The structure makes it easy for an agent to extract preconditions and call order.

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 destructive whole-schema replacement with no output schema, the description covers all critical dimensions: destructive semantics, persistence vs deployment, schema construction rules, concurrency via expected_version, and the surrounding workflow. Nothing necessary for correct invocation appears 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. However, the description adds substantial meaning beyond the schema: it details the required 'nodes' key, required entity description/schema fields, field type syntax and required defaults, relationship from/to/cardinality, naming conventions, and expected_version's conflict behavior. This meaningfully compensates for what raw property descriptions do not say.

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 first sentence states the exact operation: 'Replace a graph project's WHOLE schema (saves to database, does NOT deploy).' This clearly distinguishes it from siblings like patch_schema or update_schema, which modify schema incrementally, and from deploy_graph_staging/production, which deploy. An agent can identify the correct tool without opening the schema.

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?

The description provides an explicit four-step workflow: get_graph_schema for current version, preview_schema_change to check diff/plan, update_graph_schema with expected_version, then deploy_graph_staging/get_job_status. It also directs the agent to follow create_graph_project rules, giving clear when-to-use and prerequisite context. This is unusually complete routing guidance.

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.