Skip to main content
Glama

upsert_guardrail_mcp_server

DestructiveIdempotent

Create or replace a single guardrail mapping for one MCP server while leaving other server mappings unchanged; optionally set input/output phases for the guardrail.

Instructions

Create or replace one guardrail mapping for one MCP server without changing mappings for other servers. Requires a guardrail with target mcp_tools. run_on defaults to both input and output. Use list_guardrail_mcp_servers to inspect the current mapping set first. Repeating the same mapping is safe.

Input Schema

NameRequiredDescriptionDefault
run_onNoGuardrail phases to run for this MCP server
guardrail_idYesGuardrail UUID or slug
mcp_server_idYesMCP server UUID
mcp_integration_capability_idsNoMCP integration capability UUIDs covered by this mapping

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. Addedv0.12.2

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and openWorldHint=true, so the safety profile is carried. The description adds non-obvious context: the prerequisite on the guardrail's target, the single-server blast radius, and a safety note that repeating the mapping is harmless.

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 scope constraint is front-loaded in the opening clause, prerequisites and defaults follow in short declarative sentences, and no sentence is filler. Five tight sentences with zero redundancy.

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, idempotent upsert with an output schema and full param coverage, the description supplies the two things structured data cannot: the guardrail target prerequisite and the single-mapping blast radius. Nothing needed to call it correctly is missing.

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 the schema already documents run_on's purpose and default, guardrail_id as UUID-or-slug, and the capability IDs. The description restates the run_on default and adds the target requirement but nothing new about the capability list parameter; baseline 3 applies when the schema does the work.

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 ('create or replace'), resource ('one guardrail mapping for one MCP server'), and a scope constraint ('without changing mappings for other servers') that separates it from the set-level sibling replace_guardrail_mcp_servers. An agent can pick this over the bulk alternative without opening a schema.

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?

Explicitly directs the agent to run list_guardrail_mcp_servers first and states the prerequisite that the guardrail must have target mcp_tools. It implies but never names replace_guardrail_mcp_servers as the alternative for whole-set updates, so the when-not is left to inference.

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