Skip to main content
Glama

verify_reply_safety

Read-onlyIdempotent

Verify a draft AI customer support reply against authoritative order, customer, and policy facts before sending to block hallucinations, PII leaks, invalid codes, and unsafe refund claims.

Instructions

Pre-send deterministic safety and hallucination verifier for a draft AI customer support response. Runs completely offline without an API key, validating every email address, order ID, promo code, monetary figure, refund commitment, template placeholder, and punctuation rule against authoritative groundTruth records. Returns JSON with safe (boolean), riskLevel ('pass' | 'review' | 'block'), violationCount, violations[], and verifiedClaims[].

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": {
      "candidateReply": "<candidateReply>"
    },
    "name": "verify_reply_safety"
  }
}

Input Schema

NameRequiredDescriptionDefault
groundTruthNoAuthoritative customer, order, catalog, discount, and policy facts used to verify every claim in candidateReply.
strictStyleNoWhen true, flag em dashes and en dashes in candidateReply as low-severity style violations.
candidateReplyYesDraft customer-facing AI response text to verify prior to delivery.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.2.1

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare read-only, idempotent, closed-world, non-destructive, but the description adds substantive context beyond them: it runs offline with no API key, is deterministic, enumerates the exact claim categories checked (emails, order IDs, promo codes, monetary figures, refund commitments, placeholders, punctuation), and specifies the return fields. With no output schema, that return-shape disclosure is genuinely valuable.

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?

Two sentences, front-loaded with the core purpose, and the enumerated claim types each carry information about what gets validated. The list is long but not padded; a slightly tighter phrasing could shorten it, so not a full 5.

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?

For a tool with a deep nested input object and no output schema, the description supplies both the validation scope and the return contract (safe, riskLevel enum values, violationCount, violations[], verifiedClaims[]). Nothing an agent needs in order to call and interpret the result is missing.

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% and the nested groundTruth object is documented field-by-field, so the description only adds the general notion that groundTruth supplies authoritative facts. It does not explain candidateReply or the semantics of the three top-level parameters beyond what the schema already carries, so baseline 3 applies.

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 specific verb and resource — a pre-send deterministic safety and hallucination verifier for a draft AI support reply — and the 'pre-send' framing plus the 'verifier' role clearly separates it from the sibling send_customer_reply. An agent can identify what it does without opening the schema.

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?

'Pre-send' establishes the usage point in the workflow: run on a draft before delivery. It does not name the sibling send tool explicitly or state when verification can be skipped, so it stops short of full when/when-not routing, but the context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.