Skip to main content
Glama

Test a policy on my project

test_policy_on_project
Read-only

Runs example messages against one of the user's Advanced mode projects, with a draft policy or the saved one, and says which would be flagged, with a score and reason for each. 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 and no credits are used. 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": {
      "project_id": "<project_id>",
      "examples": "<examples>"
    },
    "name": "test_policy_on_project"
  }
}

Input Schema

NameRequiredDescriptionDefault
policyNoDraft policy in plain English, up to 1,000 characters. Leave out to test the saved policy.
examplesYesMessages to test, up to 50.
thresholdNoFlag above this score, 0 to 1. Leave out to use the project's setting.
project_idYesThe project's id, from list_projects.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.7/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true, and the description corroborates this with two concrete guarantees: nothing is stored and no credits are consumed. It also discloses evaluation order (word rules run first, matching live behavior) and a per-call cap of 50 examples, which is genuine behavioral context beyond the annotations.

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?

Four dense sentences, front-loaded with the core action and return shape, followed by the expect/summary mechanic and the cost/safety guarantees. There is no filler, though the expect instruction could be tightened since the schema already labels the enum.

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 carries the return-value burden and does so: flagged status, score, reason per example, plus an expectation-match summary. It also covers the unstored/no-credit contract and the 50-example limit, leaving only threshold defaulting (which the schema handles) unaddressed.

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 description coverage is 100%, so all four parameters are already documented, making 3 the baseline. The description adds the semantics of the expect field and that the summary compares results against it, but it says nothing extra about threshold or the policy length bound beyond what the schema states.

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?

The description opens with a specific verb and resource: run example messages against an Advanced mode project using a draft or saved policy, returning flagged results with score and reason. This clearly separates it from test_word_rules (project word rules run first here) and from generic moderation. It stops short of explicitly naming test_policy as the non-project variant, so it is clear but not fully sibling-differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is strongly implied: this is the tool for validating a candidate or saved policy against sample messages before going live, and the 'Advanced mode projects' phrasing is a prerequisite. However, there is no explicit guidance on when to choose this over test_policy or test_word_rules, and no when-not-to-use statement.

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.