Skip to main content
Glama

BRAINIAC A/B Testing & Experimentation Statistics

Evaluate a feature-flag rule set

experimentation_flag-rule-evaluate
Read-onlyIdempotent

Evaluate ordered feature-flag rules (attribute operators, semver comparison, deterministic percentage rollout) for one user context and explain which rule matched. Price $0.01 USDC. POST /api/v1/experimentation/flag-rule-evaluate. An unpaid call returns the x402 payment terms and does not run.

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": {
      "flag": "<flag>",
      "context": "<context>"
    },
    "name": "experimentation_flag-rule-evaluate"
  }
}

Input Schema

NameRequiredDescriptionDefault
flagYesflag, object. Required.
contextYescontext, object. Required.

Output Schema

NameRequiredDescriptionDefault
traceNotrace. Array.
valueNovalue. Boolean.
reasonNoreason. String.
sourcesNosources. Array.
limitationsNolimitations. Array.
matchedRuleNomatchedRule. Null.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint, so the safety profile is covered; the description adds genuinely new behavioral facts: a $0.01 USDC charge, an x402 payment-required response path, and that an unpaid call does not execute. It also discloses deterministic percentage rollout, which matters for reproducibility. It stops short of describing error behavior or response shape, but an output schema exists.

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?

Three front-loaded sentences: capability first, then price and endpoint, then the unpaid-call caveat. Every sentence carries information, though the raw POST path is marginal for an MCP caller.

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 deeply nested two-parameter tool with an output schema and full annotations, the description covers purpose, determinism and the payment gate. The only meaningful gap is behavior on invalid rule sets or malformed contexts, which is not addressed.

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 flag, salt, rules, conditions and context are already documented structurally. The description's mention of attribute operators, semver comparison and percentage rollout adds interpretive framing but no syntax or format detail beyond the schema, so baseline 3 is appropriate.

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?

Names a specific verb (Evaluate) and resource (ordered feature-flag rules), scopes the input to one user context, and states the outcome ('explain which rule matched'). An agent can distinguish this from the sibling statistical tools 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 Guidelines3/5

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

The phrase 'for one user context' implies this is a per-context evaluation call, but the description never says when to prefer it over ambiguous siblings such as experimentation_bucket-assign, nor does it state exclusions or prerequisites beyond payment.

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