Skip to main content
Glama

Set a prompt's custom filters

update-prompt-filters
Destructive

Set the custom filter values on an existing prompt. Merges: keys you omit keep their current value, and a key sent as "-" is cleared. The declared keys and their valid values are the ones list-prompt-filters returns; an undeclared key or value is refused rather than dropped. Prompt text is immutable; move-prompt-to-topic changes the topic and archive-prompt / restore-prompt change the status.

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": {
      "prompt_id": "<prompt_id>",
      "filters": "<filters>"
    },
    "name": "update-prompt-filters"
  }
}

Input Schema

NameRequiredDescriptionDefault
filtersYesFilter key to value slug, e.g. {"product":"ill","commercial":"yes"}. Send "-" as the value to clear a key.
prompt_idYesPrompt ID from get-prompt-scores

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / prompt_id / description
      Previous value: -"Prompt ID"New value: +"Prompt ID from get-prompt-scores"
  2. Changed3 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / filters / propertyNames
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / prompt_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)$"
  3. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations declare destructiveHint=true, and the description backs that up with the clearing semantics plus the fact that invalid keys cause a hard refusal rather than a partial write. It adds real context beyond the annotations, though it doesn't state whether a cleared value can be restored or what a failed multi-key update leaves behind.

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 action and the merge rule before the validation rule and the sibling routing. Dense but every clause carries information; the final routing sentence is longer than strictly necessary but prevents three plausible misroutes.

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 two-parameter mutation with no output schema, the description covers mutation scope, merge/clear semantics, validation failure, and adjacent operations. The only gap is what the tool returns (updated filter set vs. bare success), which is a minor omission for a setter.

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% and already documents both parameters, so the description only needs to add semantics. It does: the merge behavior for absent keys and the refusal of undeclared keys/values are behavioral facts the schema's free-form object shape cannot express.

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 precise verb+resource: sets custom filter values on an existing prompt. It immediately disambiguates from the near-miss siblings by naming list-prompt-filters as the key-value authority and by excluding text, topic, and status changes to move-prompt-to-topic / archive-prompt / restore-prompt.

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 spells out the merge contract (omitted keys persist, "-" clears), the validation contract (undeclared key/value is refused, not silently dropped), and where to go for the adjacent operations. An agent knows both when to call this and when to call something else.

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