Skip to main content
Glama

rank_hypotheses

Orders candidate vulnerability hypotheses by P(KEEP) to guide verification budget and decide which items to check first; returns advisory rankings without deleting anything.

Instructions

Rank vulnerability hypotheses by P(KEEP) — a local decision model (Laya) picks the verify order.

Use when the agent (or user) holds a list of candidate vulnerability hypotheses and must decide which ones deserve a verification budget FIRST — the same role Laya plays as the Scout→Verify gate in the arcanum-spark pipeline. Input is a JSON array of items: {"id", "title", "vuln_type", "file_path", "attack_path"} (id and attack_path optional). Optionally pass baseline — a JSON array of deterministic findings ({"file", "rule", "title"}) so echo-hypotheses that just restate a rule hit can be down-ranked. Output is an advisory ranking with P(KEEP) and confidence per item; NOTHING is deleted or pruned (order-only contract). Requires the Laya checkpoint: download the laya-checkpoints release assets from github.com/a9320/arcanum-spark, then set ARCA_LAYA_PATH to the model directory (needs pip install arcanum-mcp[laya] for torch). Runs offline on CPU (~0.4s/item). Not for: scanning text or code — use pitax_scan/code_audit/docs_scan; this tool RANKS hypotheses, it does not detect anything. Triggers: which hypothesis should I verify first, 排序假设, 验证预算, rank these candidates, 先验证哪条, 假设排序.

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": {
      "hypotheses": "<hypotheses>"
    },
    "name": "rank_hypotheses"
  }
}

Input Schema

NameRequiredDescriptionDefault
baselineNo
hypothesesYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.5

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses the ordering-only contract ("NOTHING is deleted or pruned"), the advisory nature plus per-item P(KEEP) and confidence, the prerequisite checkpoint download and ARCA_LAYA_PATH environment variable, the extra pip dependency, and the offline CPU cost (~0.4s/item). These are precisely the operational facts an agent needs before committing.

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?

The core contract (rank, order-only, no deletion) is front-loaded and each paragraph adds distinct information — capability, inputs, output, prerequisites, exclusions. It runs long, and the setup/torch instructions plus the trailing bilingual trigger list are closer to onboarding documentation than tool-selection guidance, which slightly dilutes the routing signal.

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 two-parameter tool with an output schema, this covers everything the schema and annotations leave open: the payload shapes, the optionality rules, the non-destructive ordering guarantee, and the environment prerequisites that would otherwise cause a runtime failure. The presence of an output schema means the description is not obliged to detail return values, and it still summarizes them.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and both parameters are bare strings, so the description must compensate — and it does, enumerating the hypothesis item shape ({"id", "title", "vuln_type", "file_path", "attack_path"}) with optionality of id and attack_path, and the baseline finding shape ({"file", "rule", "title"}) along with its purpose of down-ranking echo hypotheses. This also resolves the apparent mismatch between the string-typed schema fields and the JSON-array payloads they carry.

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?

The description leads with a specific verb and resource ("Rank vulnerability hypotheses by P(KEEP)") and immediately names the decision model that determines the ordering. It also explicitly contrasts itself with siblings ("this tool RANKS hypotheses, it does not detect anything" vs. pitax_scan/code_audit/docs_scan), so an agent can separate it from the scanners without opening any schema.

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

Usage Guidelines5/5

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

It states the exact situation that selects this tool ("the agent or user holds a list of candidate vulnerability hypotheses and must decide which ones deserve a verification budget FIRST") and the situation that excludes it ("Not for: scanning text or code — use pitax_scan/code_audit/docs_scan"). The trigger phrases add concrete routing cues for ambiguous user phrasing.

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