Check whether a ranking engine ignores payout (static-imports only)
check_payout_invarianceScans supplied source files for payout-related identifiers to verify a ranking engine never references commission, payout, or affiliate data.
Instructions
Checks whether payout-related identifiers (commission, payout, affiliate rate) appear in the source of a ranking/recommendation engine. Only static-imports mode is available: running your ranking function under payout-mutation scenarios (runtime mode) is turned off because it runs caller-supplied JavaScript. The server operator can turn it on by setting HONESTY_MCP_ENABLE_CODE_EXEC=1; that runs the code with the server's full filesystem, network and environment access, and the worker thread only bounds time. static-imports mode greps source files you supply for any reference to payout-related identifiers, to assert the ranking engine's code never even has payout data in scope. You send the file contents as a map of path -> content; this server does not read paths from disk, and a list of paths is rejected. Matching is whole-word and case-insensitive: the identifier commission is NOT matched inside commissionRate, commission_rate, affiliateUrl or payoutPerClick, so those names do not match. Pass matchIdentifierParts: true to also find an identifier as one part of a longer camelCase, snake_case, SCREAMING_CASE or kebab-case name (it still does not match plurals such as affiliates, or a word fused into another with no separator, such as mypayout). It is a best-effort text/regex grep, not a real parser (it won't catch a dynamically-built import specifier or a re-export under an aliased name). An empty result means no match in the text you sent, not that the engine is payout-neutral in general; re-run this in CI whenever the ranking logic changes.
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": {
"mode": "<mode>"
},
"name": "check_payout_invariance"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | Which check to run. Only `static-imports` is available. | |
| files | No | [static-imports mode, required, at least one file] Source files to scan for payout references, as a map of path -> content. A list of paths or an empty map is a tool error. | |
| stripComments | No | [static-imports mode] Strip comments before matching, so a mention in a comment doesn't count. Default true. | |
| payoutIdentifiers | No | [static-imports mode, required, non-empty] Identifiers that must never appear in the ranking engine's source, e.g. "commission", "payout", "affiliateRate". Each is matched as a whole word (`commission` does not match `commissionRate`; see `matchIdentifierParts`). An identifier that is blank (only whitespace or invisible characters) is a tool error. | |
| caseInsensitiveMatch | No | [static-imports mode] Case-insensitive identifier matching. Default true. | |
| matchIdentifierParts | No | [static-imports mode, payout-invariance-kit 0.3+] Default false (whole-word matching, so `commission` does not match `commissionRate`). When true, an identifier is also found as one part of a longer camelCase, snake_case, SCREAMING_CASE or kebab-case name (`affiliate` finds `affiliateUrl` and `AFFILIATE_URL`), but not plurals or words fused with no separator. |