Skip to main content
Glama

Test a moderation policy

test_policy
Read-only

Runs example messages against an Advanced mode policy and says which would be flagged, with a score and reason for each. Send a draft policy to try changes before saving them; leave it out to test the saved policy. Mark each example with expect "flag" or "pass" and the summary counts how many came back as expected. The project's word rules run first, as they do live. Nothing is stored. No credits are used, except on a free test key from create_test_api_key, where each message checked counts toward its 100 free messages. Up to 50 examples per call.

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": {
      "api_key": "<api_key>",
      "examples": "<examples>"
    },
    "name": "test_policy"
  }
}

Input Schema

NameRequiredDescriptionDefault
policyNoDraft policy in plain English, up to 1,000 characters. Leave out to test the saved policy.
api_keyYesPaxmod API key for the project.
examplesYesMessages to test, up to 50.
thresholdNoFlag above this score, 0 to 1. Leave out to use the project's setting.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Goes well beyond the readOnlyHint annotation: nothing is stored, no credits are consumed except against a free test key from create_test_api_key where each message counts toward its 100-message allowance, word rules run first as in production, and the 50-example cap. That's strong operational context for a mutation-adjacent dry run. It doesn't describe latency, error behavior, or how policy drafts are validated.

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 what the tool does and what it returns, then the draft/saved distinction, then cost and limits — a sensible order with no filler. 'Up to 50 examples per call' mildly duplicates the schema's maxItems, and the sentences are dense enough that a scan could miss the credit caveat.

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?

With no output schema, the description does the necessary work of saying the response carries a per-example flag plus score and reason, and an expectation-match summary. Combined with the cost and limit disclosures, an agent has enough to call it correctly. Return shape details (field names, per-example error handling) remain unspecified.

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 3, and the description earns above that by explaining the practical effect of the expect field (the summary counts matches) and the draft-vs-saved behavior of policy. The threshold parameter is left entirely to the schema, keeping it from a 5.

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?

States a specific verb and resource: runs example messages against an Advanced mode policy and reports flags with score and reason. It also implicitly separates itself from raw word-rule testing by noting the project's word rules run first. It stops short of naming its near-twin sibling test_policy_on_project, so an agent must still infer which of the two to call.

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?

Gives clear conditional guidance: include a draft policy to try changes before saving, omit it to test the saved one, and mark examples with expect to get a pass/fail summary. What's missing is explicit routing against siblings — nothing says when to use this instead of test_policy_on_project or moderate_text.

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.