Skip to main content
Glama

Apply Domain Template

lexq_domain_templates_apply

Apply a domain template to the current tenant. Creates the template's fact definitions and a new policy group pre-populated with its sample rules as a DRAFT version. Apply never overwrites existing schema: a key that already exists with the same definition is kept as it is. Run lexq_domain_templates_preview first. If its factConflicts is not empty, apply fails with P-061 and creates nothing until those facts are deleted or changed to match the template. A template whose isAvailable is false cannot be applied.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
templateYesDomain template key to apply (e.g. ECOMMERCE).
customNameNoOptional custom name for the policy group that gets created. If omitted, the template's default name is used.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=false / destructiveHint=false. The description goes well beyond: it discloses non-destructive merge semantics ('never overwrites existing schema'), draft-only creation of the policy group, the specific error code and all-or-nothing failure behavior, and the isAvailable gate.

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?

Five tight sentences, front-loaded with the action and its side effects, then prerequisites and failure modes. No filler and every sentence carries operational 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?

For a mutation tool with no output schema, the description covers the side effects, the merge semantics, the prerequisite sibling call, and the failure conditions an agent needs to call it safely.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and both parameters are documented there, so the baseline of 3 applies. The description adds only indirect meaning (the policy group that customName names), without new syntax or constraint detail beyond 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?

States a specific verb (Apply) and resource (domain template) scoped to the current tenant, and immediately describes the concrete side effects (creates fact definitions and a draft policy group). It is clearly distinguishable from lexq_domain_templates_list and lexq_domain_templates_preview.

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 tells the agent to run lexq_domain_templates_preview first, states the exact condition under which apply fails (factConflicts non-empty → P-061, creates nothing) and the precondition that isAvailable must be true. When-to-use and when-not is fully covered.

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.