Skip to main content
Glama

create_guardrail

Create an LLM or MCP-tool guardrail with checks and actions; MCP-tool guardrails can be created first and mapped to servers afterward.

Instructions

Create an LLM or MCP-tool guardrail. LLM guardrails require checks and actions; MCP-tool guardrails can be created first and mapped to servers afterward. The new version becomes the policy anchor for downstream use.

Input Schema

NameRequiredDescriptionDefault
nameYesName of the guardrail
checksNoChecks to apply; at least one entry. Required when target is llm.
targetNoLLM traffic by default, or MCP tool calls
actionsNoActions to take when guardrail checks pass or fail
workspace_idNoWorkspace ID to create the guardrail in
organisation_idNoOrganisation ID (required if workspace_id not provided)

Output Schema

NameRequiredDescriptionDefault
okYesWhether the tool call succeeded and returned structured data
dataNoStructured success payload when ok is true
errorNoStructured error payload when ok is false

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.0.9
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed3 schema fields changedv0.12.2
    • changedInput schema / properties / checks / description
      Previous value: -"Array of checks to apply (at least one required)"New value: +"Checks to apply; at least one entry. Required when target is llm."
    • addedInput schema / properties / target
      Added value: +{
      +  "description": "LLM traffic by default, or MCP tool calls",
      +  "enum": [
      +    "llm",
      +    "mcp_tools"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "name",
      -  "checks",
      -  "actions"
      -]New value: +[
      +  "name"
      +]
  3. Changed1 schema field changedv0.11.5
    • changedInput schema / properties / checks / items / properties / parameters / description
      Previous value: -"Check-specific configuration parameters"New value: +"Check-specific configuration. Supported examples include requestParametersCheck and parameters.forwardHeaders; forwarded headers can expose sensitive values, so allow only the minimum required names."
  4. Addedv1.0.1
  5. Removed
  6. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover the safety profile (non-read-only, non-destructive, non-idempotent, open-world), so the description earns credit for the extra claim that the created version becomes the 'policy anchor for downstream use' – non-obvious versioning semantics an agent would otherwise miss. It still doesn't say whether the guardrail is immediately active/enforced or whether creation fails on duplicate names.

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?

Three short sentences, front-loaded with what is created, then the variant-specific constraints, then the downstream consequence. No filler or restatement of the tool name.

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 and annotations cover mutability, so the description needn't explain return values. Given six parameters including nested checks/actions, it covers the essential structural distinction between the two target modes, but omits scoping behavior (workspace vs organisation id) and enforcement timing.

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 schema documents all six parameters and the baseline is 3. The description goes beyond the schema by stating the conditional requirement (checks and actions for LLM targets) and the default target behavior, which is real semantic value the schema only encodes indirectly.

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 and resource ('Create an LLM or MCP-tool guardrail') and immediately splits the resource into its two variants, which an agent can act on. It does not explicitly contrast itself with create_guardrail's closest siblings (update_guardrail, list_guardrails), so it stops just short of full differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states a meaningful usage condition – LLM guardrails need checks and actions, while MCP-tool guardrails may be created bare and mapped to servers later – which implies the correct ordering of operations. It never says when to use this versus update_guardrail or what happens if a guardrail already exists, so the guidance is inferred rather than explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools