Skip to main content
Glama

cross-field-rules

Check caller-declared rules across fields of a JSON record: end after start, conditional required, exactly one of — Evaluates up to 100 rules you declare over one JSON document and reports, per rule, pass, fail or unknown with the JSON pointer of every violating field and the actual value class (absent, null, empty string, value). Rule kinds: compare (>, >=, <, <=, ==, != on numbers, exact decimals, RFC 3339 dates or date-times, strings), required-if, forbidden-if, exactly-one, at-most-one, at-least-one, all-or

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": {
      "data": "<data>",
      "rules": "<rules>"
    },
    "name": "cross-field-rules"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYesThe JSON document the rules apply to.
rulesYes
onMissingNoMissing or null compare operand: unknown (default), fail or skip.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does substantial work: it discloses the 100-rule cap, the three-valued outcome (pass/fail/unknown), that violations report a JSON pointer plus the actual value class (absent, null, empty string, value), and which rule families exist. Gaps remain around malformed-pointer handling, ordering of reported violations, and whether evaluation is all-or-nothing, but the core behavioral contract is visible.

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 purpose and three illustrative rule examples before the mechanics, so a reader can stop early. It is dense but each clause carries information; the only real defect is the truncated trailing enumeration and slight redundancy with the schema's kind 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?

There is no output schema, and the description correctly compensates by specifying the response shape (per-rule verdict, violating JSON pointer, value class). For a tool with a nested rule vocabulary and two required top-level inputs, it covers the essentials but leaves several rule kinds and the `as`/`tolerance` parameters unexplained, which matters for a complex schema.

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?

At 67% schema coverage the baseline applies, and the description does add real meaning by spelling out what compare operands may be (numbers, exact decimals, RFC 3339 dates/date-times, strings), which the enum alone does not convey. However, it explains almost none of the other rule parameters — `as`, `when`, `require`/`forbid`/`fields`, `tolerance`, `sum-equals` — and the kind list is truncated mid-word ("all-or"), so it only partially compensates.

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?

Opens with a specific verb and resource: "Check caller-declared rules across fields of a JSON record," followed by concrete rule examples (end after start, conditional required, exactly one). An agent can tell this is a declarative rule evaluator over a JSON document rather than a path-level or schema-validator tool, though it never names its closest sibling (path-rules) to draw the boundary explicitly.

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 implied by the mechanics — you declare up to 100 rules over one document and get per-rule verdicts — but there is no explicit "use this when..." statement, no exclusion of alternatives, and no guidance on when to prefer this over path-rules or a JSON-patch/conflict checker. The agent must infer the selection criterion from the rule kinds alone.

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