Skip to main content
Glama

Add or replace a release policy

set_policy
DestructiveIdempotent

Add a release policy to an organization, or replace the one with the same name. A policy runs its checker on every publish. It monitors by default: it records findings and never refuses a release. A blocking policy refuses a release that has a finding at or above that severity, or that the checker could not evaluate; block needs block_at, and block_at alone means block. list_policies shows the checkers and their settings.

Replacing a policy replaces its settings: pass every non-secret setting again. A change to a policy applies to releases not yet decided. Changing a policy's enforcement or settings never changes a decided evaluation, and a running policy evaluation keeps the checker and enforcement it started with. A running policy evaluation whose checker hasn't started yet uses the current settings. Removing a policy, or changing its checker, cancels its running policy evaluations, so releases that waited only on it go ahead.

A checker with secret fields, such as an API token, does not take them here. The answer carries a request whose url an Admin opens, signed in to Valet, to enter them; the policy is saved when they do, and a field left blank keeps its stored value. A request is made only when a required secret is not stored yet, or replace_secrets is true to enter them again. Say in reason why the checker needs them. Give the person the url, then follow the request with get_request. Never ask for a secret in this conversation. Otherwise the policy saves at once. Returns the saved policy's checker, enforcement, and block_at, which settings were set and which secrets were kept, and the request when a person enters secrets first. Requires connecting a Valet account. Requires the Admin role.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "policy": "<policy>",
      "checker": "<checker>"
    },
    "name": "set_policy"
  }
}

Input Schema

NameRequiredDescriptionDefault
policyYesWhat to call the policy, such as dependencies, so list_policies and destroy_policy can name it. Saving under a name already in use replaces that policy.
reasonNoShown to the person on the request page to explain why the values are needed, so they can decide whether to enter them, such as: The checker calls your scanner and needs its API token.
checkerYesThe checker to run, spelled as list_policies reports it, such as catalog:secrets.
block_atNoThe least serious finding that stops a release; findings below it are only recorded. Omit it for a policy that only records findings, unless enforcement is block, which needs it.
org_nameNoThe Valet organization that owns the policy. Omit to use the organization the account joined first.
settingsNoThe checker's non-secret settings, as field name to value. Secret fields are entered by a person on the request page, never here.
enforcementNoWhat a finding does: monitor records it for the team to read, and block also stops the release. Start with monitor to see what a checker finds before it can hold up publishing.
replace_secretsNoAsk the person to enter the checker's secrets again, replacing the stored ones. The request lists every secret field, required or not.

Output Schema

NameRequiredDescriptionDefault
orgYesName of the Valet organization the call acted in.
policyYesThe policy's name.
checkerYesThe checker the policy runs.
requestNoThe request a person completes in the dashboard to enter a value that must not pass through this conversation. Absent when nothing needs a person.
block_atNoThe lowest severity that blocks. Absent when no severity was set.
enforcementYesmonitor or block. While request is set the policy is not saved yet, and this is what it is saved as when the person completes the request.
secrets_keptNoNames of the secret settings that kept their stored values. Absent when none did, or when a request is pending.
settings_setNoNames of the non-secret settings the call gave. Absent when it gave none.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / block_at / description
      Previous value: -"The least serious finding that stops a release; findings below it are only recorded."New value: +"The least serious finding that stops a release; findings below it are only recorded. Omit it for a policy that only records findings, unless enforcement is block, which needs it."
    • changedInput schema / properties / reason / description
      Previous value: -"Why the request is made, in words the person reads on the request page before entering anything, so they know what the values are for, such as: The checker calls your scanner and needs its API token."New value: +"Shown to the person on the request page to explain why the values are needed, so they can decide whether to enter them, such as: The checker calls your scanner and needs its API token."
  2. Changed4 schema fields changed
    • changedInput schema / properties / block_at / description
      Previous value: -"The lowest severity that refuses a release."New value: +"The least serious finding that stops a release; findings below it are only recorded."
    • changedInput schema / properties / enforcement / description
      Previous value: -"Whether the policy only records findings (monitor) or refuses a release that has one at or above block_at (block)."New value: +"What a finding does: monitor records it for the team to read, and block also stops the release. Start with monitor to see what a checker finds before it can hold up publishing."
    • changedInput schema / properties / policy / description
      Previous value: -"The policy's name, such as dependencies. An existing name is replaced."New value: +"What to call the policy, such as dependencies, so list_policies and destroy_policy can name it. Saving under a name already in use replaces that policy."
    • changedInput schema / properties / reason / description
      Previous value: -"Why the request is made, in the words the person reads on the request page, such as: The checker calls your scanner and needs its API token."New value: +"Why the request is made, in words the person reads on the request page before entering anything, so they know what the values are for, such as: The checker calls your scanner and needs its API token."
  3. Changed3 schema fields changed
    • changedInput schema / properties / block_at / description
      Previous value: -"A finding at or above this severity refuses a release. Required with enforcement block."New value: +"The lowest severity that refuses a release."
    • changedInput schema / properties / enforcement / description
      Previous value: -"monitor records findings and never refuses a release; block refuses one with a finding at or above block_at. Omit for monitor, or for block when block_at is given."New value: +"Whether the policy only records findings (monitor) or refuses a release that has one at or above block_at (block)."
    • changedInput schema / properties / reason / description
      Previous value: -"Why the request is made, in the words the person reads on the request page, such as: The checker calls your scanner and needs its API token. Needed when the checker has secret fields that are not stored yet."New value: +"Why the request is made, in the words the person reads on the request page, such as: The checker calls your scanner and needs its API token."
  4. Changed2 schema fields changed
    • changedInput schema / properties / block_at / description
      Previous value: -"The lowest severity that blocks. Required with enforcement block."New value: +"A finding at or above this severity refuses a release. Required with enforcement block."
    • changedInput schema / properties / reason / description
      Previous value: -"Needed when the checker has secret fields that are not stored yet. Why the request is made, in the words the person reads on the request page, such as: The checker calls your scanner and needs its API token."New value: +"Why the request is made, in the words the person reads on the request page, such as: The checker calls your scanner and needs its API token. Needed when the checker has secret fields that are not stored yet."
  5. Changed1 schema field changed
    • changedInput schema / properties / reason / description
      Previous value: -"Needed when the checker has secret fields that are not stored yet. Why the value is needed, in the words the person reads on the request page, such as: The app charges cards and needs your Stripe key."New value: +"Needed when the checker has secret fields that are not stored yet. Why the request is made, in the words the person reads on the request page, such as: The checker calls your scanner and needs its API token."
  6. Changed1 schema field changed
    • changedOutput schema / properties / enforcement / description
      Previous value: -"monitor or block, as the policy is or will be saved."New value: +"monitor or block. While request is set the policy is not saved yet, and this is what it is saved as when the person completes the request."
  7. Changed1 schema field changed
    • changedInput schema / properties / reason / description
      Previous value: -"Needed when the checker has secret fields that are not stored yet. One plain sentence, shown to the person on the request page, saying why the value is needed, such as: The app charges cards and needs your Stripe key."New value: +"Needed when the checker has secret fields that are not stored yet. Why the value is needed, in the words the person reads on the request page, such as: The app charges cards and needs your Stripe key."
  8. Changed20 schema fields changed
    • changedInput schema / properties / checker / description
      Previous value: -"Required. The checker to run, spelled as list_policies reports it, such as catalog:secrets."New value: +"The checker to run, spelled as list_policies reports it, such as catalog:secrets."
    • changedInput schema / properties / enforcement / description
      Previous value: -"monitor (the default) records findings and never refuses a release. block refuses one with a finding at or above block_at."New value: +"monitor records findings and never refuses a release; block refuses one with a finding at or above block_at. Omit for monitor, or for block when block_at is given."
    • changedInput schema / properties / policy / description
      Previous value: -"Required. The policy's name: lowercase letters, digits, and hyphens, such as dependencies. An existing name is replaced."New value: +"The policy's name, such as dependencies. An existing name is replaced."
    • addedInput schema / properties / policy / maxLength
      Added value: +63
    • addedInput schema / properties / policy / minLength
      Added value: +1
    • addedInput schema / properties / policy / pattern
      Added value: +"^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$"
    • changedInput schema / properties / reason / description
      Previous value: -"Required when the checker has secret fields that are not stored yet. One plain sentence, shown to the person on the request page, saying why the value is needed, such as: The app charges cards and needs your Stripe key. At most 280 characters."New value: +"Needed when the checker has secret fields that are not stored yet. One plain sentence, shown to the person on the request page, saying why the value is needed, such as: The app charges cards and needs your Stripe key."
    • addedOutput schema / properties / block_at / description
      Added value: +"The lowest severity that blocks. Absent when no severity was set."
    • addedOutput schema / properties / checker / description
      Added value: +"The checker the policy runs."
    • addedOutput schema / properties / enforcement / description
      Added value: +"monitor or block, as the policy is or will be saved."
    • addedOutput schema / properties / org / description
      Added value: +"Name of the Valet organization the call acted in."
    • addedOutput schema / properties / policy / description
      Added value: +"The policy's name."
    • addedOutput schema / properties / request / description
      Added value: +"The request a person completes in the dashboard to enter a value that must not pass through this conversation. Absent when nothing needs a person."
    • addedOutput schema / properties / request / properties / expires_at / description
      Added value: +"When the request expires unanswered, as an RFC 3339 UTC time."
    • addedOutput schema / properties / request / properties / fields / description
      Added value: +"Names of what the person enters, never values."
    • addedOutput schema / properties / request / properties / id / description
      Added value: +"Id of the request. Pass it to get_request to follow the request."
    • addedOutput schema / properties / request / properties / next_step / description
      Added value: +"What to do next: give the person the url, then follow the request with get_request."
    • addedOutput schema / properties / request / properties / url / description
      Added value: +"Dashboard page to give the person. They open it signed in to Valet to complete the request. It holds no credential."
    • addedOutput schema / properties / secrets_kept / description
      Added value: +"Names of the secret settings that kept their stored values. Absent when none did, or when a request is pending."
    • addedOutput schema / properties / settings_set / description
      Added value: +"Names of the non-secret settings the call gave. Absent when it gave none."
  9. Changed6 schema fields changed
    • addedInput schema / properties / reason
      Added value: +{
      +  "description": "Required when the checker has secret fields that are not stored yet. One plain sentence, shown to the person on the request page, saying why the value is needed, such as: The app charges cards and needs your Stripe key. At most 280 characters.",
      +  "maxLength": 280,
      +  "type": "string"
      +}
    • addedInput schema / properties / replace_secrets
      Added value: +{
      +  "description": "Ask the person to enter the checker's secrets again, replacing the stored ones. The request lists every secret field, required or not.",
      +  "type": "boolean"
      +}
    • removedInput schema / properties / secrets
      Removed value: -{
      -  "additionalProperties": {
      -    "type": "string"
      -  },
      -  "description": "The checker's secret settings, as field name to value. A value passed here travels through this conversation; leave it out and point the user at valet policies add when they would rather it did not. A field you leave out keeps its stored value.",
      -  "type": "object"
      -}
    • changedInput schema / properties / settings / description
      Previous value: -"The checker's non-secret settings, as field name to value."New value: +"The checker's non-secret settings, as field name to value. Secret fields are entered by a person on the request page, never here."
    • addedOutput schema / properties / request
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "expires_at": {
      +      "type": "string"
      +    },
      +    "fields": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": [
      +        "null",
      +        "array"
      +      ]
      +    },
      +    "id": {
      +      "type": "string"
      +    },
      +    "next_step": {
      +      "type": "string"
      +    },
      +    "url": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "id",
      +    "url",
      +    "expires_at",
      +    "fields",
      +    "next_step"
      +  ],
      +  "type": [
      +    "null",
      +    "object"
      +  ]
      +}
    • removedOutput schema / properties / secrets_set
      Removed value: -{
      -  "items": {
      -    "type": "string"
      -  },
      -  "type": [
      -    "null",
      -    "array"
      -  ]
      -}
  10. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "block_at": {
      +      "type": "string"
      +    },
      +    "checker": {
      +      "type": "string"
      +    },
      +    "enforcement": {
      +      "type": "string"
      +    },
      +    "org": {
      +      "type": "string"
      +    },
      +    "policy": {
      +      "type": "string"
      +    },
      +    "secrets_kept": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": [
      +        "null",
      +        "array"
      +      ]
      +    },
      +    "secrets_set": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": [
      +        "null",
      +        "array"
      +      ]
      +    },
      +    "settings_set": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": [
      +        "null",
      +        "array"
      +      ]
      +    }
      +  },
      +  "required": [
      +    "org",
      +    "policy",
      +    "checker",
      +    "enforcement"
      +  ],
      +  "type": "object"
      +}
  11. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already flag destructive/openWorld/idempotent, but the description adds substantial context beyond them: how replacement resets settings, how in-flight evaluations keep or adopt settings, that changing a checker cancels running evaluations, that secrets are never passed here, and that Admin role plus a connected Valet account are required.

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

Conciseness4/5

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

Front-loaded with the core action and default enforcement, then grouped into coherent paragraphs on replacement, evaluation lifecycle, and secrets. It is long and a few lines restate each other (e.g., 'Replacing a policy replaces its settings'), but nearly every sentence carries distinct 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?

Despite eight parameters, nested settings, and an output schema, the description covers the full decision surface an agent needs: enforcement choice, replacement semantics, secret handoff, auth prerequisites, and a pointer to get_request after creating a request.

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 high, and the description still adds real meaning: 'block_at alone means block', 'pass every non-secret setting again' on replacement, and when a request is made (missing required secret, or replace_secrets true). It does not add much on org_name or reason beyond the schema, which keeps it from a 5.

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?

Opens with a specific verb and resource: 'Add a release policy to an organization, or replace the one with the same name.' It also names sibling tools (list_policies, destroy_policy) so the agent can separate this from listing or deleting policies without opening schemas.

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 routes behavior: monitor is the default, block needs block_at, and 'Start with monitor to see what a checker finds before it can hold up publishing.' It also gives procedural guidance for secrets ('Never ask for a secret in this conversation', 'follow the request with get_request') and points to list_policies for checker names.

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