Skip to main content
Glama

Set custom filter definitions

set-prompt-filter-definitions
Destructive

Replace the custom filters a domain declares. Send the complete intended list, not a patch: anything you leave out is removed. Removal is refused while prompts are still tagged with it. The current list is what list-prompt-filters returns. At most 5 filters, 50 values each; keys are lowercase letters only and value slugs lowercase alphanumeric. Confirm with the user before removing a filter.

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": {
      "domain_id": "<domain_id>",
      "filters": "<filters>"
    },
    "name": "set-prompt-filter-definitions"
  }
}

Input Schema

NameRequiredDescriptionDefault
filtersYesThe complete list, each entry { key, label, values: [{ value, label }] }
domain_idYesDomain ID from list-domains

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / domain_id / description
      Previous value: -"Domain ID"New value: +"Domain ID from list-domains"
  2. Changed4 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / domain_id / pattern
      Added value: +"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    • removedInput schema / properties / filters / items / additionalProperties
      Removed value: -false
    • removedInput schema / properties / filters / items / properties / values / items / additionalProperties
      Removed value: -false
  3. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the destructiveHint=true annotation, it discloses exactly what is destroyed (omitted filters are removed), the precondition that blocks removal (a filter still tagged on prompts), and a required confirmation step. This is the specific 'what gets destroyed and when it fails' context the annotation alone cannot convey.

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 replacement semantics before the constraints. The cardinality and pattern restatement is slightly redundant with the schema but functions as an inline guardrail, and nothing else is padded.

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?

For a destructive, no-output-schema mutation with annotations already declaring destructiveness, the description covers replacement semantics, failure conditions, current-state retrieval, and confirmation. It could still say whether the whole replacement is atomic or what happens to prompts referencing a removed value, but the essentials are present.

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 states the array is "The complete list" with key/label/values shape. The description's limits (5 filters, 50 values, key and slug patterns) duplicate the schema's maxItems and regex patterns rather than adding new meaning, so this sits at baseline.

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?

"Replace the custom filters a domain declares" gives a specific verb (replace) plus resource (filter definitions) and scope (per domain). It is clear on its own, but a very similar sibling, update-prompt-filters, is never mentioned, so the agent gets no help distinguishing the two.

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?

Strong replace-not-patch guidance ("Send the complete intended list, not a patch") and an explicit pointer to list-prompt-filters as the source of the current list. It does not address when to choose this over update-prompt-filters, which is the one genuinely ambiguous alternative.

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