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. Existing facts are skipped — apply is additive and never overwrites existing schema. Run lexq_domain_templates_preview first to review what will be created. Only ACTIVE templates can 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. Changed2 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
  2. Added

TDQS

A4.7/5.0
Behavior5/5

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

The description goes well beyond the annotations, explaining that the operation is additive and idempotent, never overwrites existing schema, skips existing facts, creates DRAFT versions, and requires template to be ACTIVE. This is rich behavioral disclosure that matches the non-destructive hint.

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?

Four compact sentences deliver the full operational picture: what the tool does, the DRAFT result, non-destructive idempotent behavior, the active-template constraint, and the preview prerequisite. There is no filler or repeated schema 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 create-style tool with one required parameter and no output schema, the description covers the action, side effects, safety guarantees, template eligibility, and the correct preceding sibling tool. Nothing essential 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?

The input schema already documents both parameters (template key and optional name), so the description does not need to repeat them. It adds useful semantic constraints beyond the schema, such as "Only ACTIVE templates can be applied" and the fact that existing facts are skipped.

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 and resource: "Apply a domain template to the current tenant," then explains exactly what the tool creates: fact definitions and a DRAFT policy group. It also distinguishes itself from the sibling preview tool by explicitly directing the agent to run lexq_domain_templates_preview first.

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?

The description gives clear operational guidance by instructing the agent to run lexq_domain_templates_preview before applying. It also limits applicability to ACTIVE templates conditions that help the agent decide when the tool is valid. However, it does not contrast apply with list/preview beyond that one prerequisite.

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