Skip to main content
Glama

Materialize entity region

nest_schema_region
Destructive

Materialize an entity region from get_schema's x-entityMap. Ordinary flat members (e.g. product_id, product_name on an order line) move into a new object named after the region, regions hanging from it move along (nest them in turn inside the new object), pairing facts stay on the host, and the moved names shed the region's tokens (product_name → name) unless strip_prefix=false. A pairing region nests the same way: its pair facts gather into a pairing object with the entity hanging from it (series_volume → series_engagement.volume beside book_series). Compact scalar occurrences (e.g. manufacturer_name or each therapeutic_classes[] item) are all converted to references to one shared $defs entity; host_path and strip_prefix do not apply to that form. If the schema already uses semantic IDs, the created object gets one when generation's gates allow (keyed, not only by exact values, not a pairing); no other object changes. host_path is '' for the root, an object path, 'path[]' for an array's items, or '$defs.X'. Defaults to dry_run=true: inspect the returned schema_content and notes, then persist with dry_run=false only after approval of the change. Requires editor; no LLM call. Database-linked structural edits still require publish_schema. Modeling consequences: enricher://docs/schema-reference.

Input Schema

NameRequiredDescriptionDefault
dry_runNoReport the rewrite without persisting it (the default).
host_pathNoContainer holding the flat members ('' = root, object path, 'path[]', '$defs.X').
region_idYesEntity region id from x-entityMap.regions (get_schema).
schema_idYesUUID of the saved schema.
strip_prefixNoDrop the region's name tokens from the moved field names.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and readOnlyHint=false, so the bar is lower; the description adds real value by disclosing the dry-run-then-approve workflow, the 'no other object changes' side-effect boundary, the conditional semantic-ID assignment gates, and the fact that host_path/strip_prefix do not apply to the compact scalar form.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The content is largely substantive, but it is delivered as one dense, run-on paragraph (~180 words) mixing preconditions, mechanics, edge cases, and modeling notes without headings or bullets, which makes it hard to parse for a long schema-rewrite operation.

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?

An output schema exists, so return values need not be explained, and the description covers the transformation mechanics, dry-run inspection flow, permissions, and prerequisites. Coverage is strong, with only minor gaps around failure modes of the rewrite.

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, but the description adds meaning beyond the schema: it defines host_path's full grammar ('' root, object path, 'path[]', '$defs.X'), explains strip_prefix's effect on moved names (product_name → name), and clarifies that both are inapplicable to the compact-scalar form.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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 ('Materialize an entity region from get_schema's x-entityMap') and details exactly what transformation occurs (flat members moved into a named object, pairing facts staying on the host, token stripping). It distinguishes itself from siblings like move_schema_property and add_schema_property by describing an entire region-rewrite, though it never explicitly names the alternatives it is not.

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?

It gives clear operational context: dry_run defaults to true and should be inspected before persisting with dry_run=false 'only after approval,' it requires the editor role, makes no LLM call, and notes that database-linked structural edits still require publish_schema. No explicit when-NOT-to-use exclusions are given, keeping it short of a 5.

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.