Skip to main content
Glama
Ajey95

ImmunoGraph MCP

rank_candidates

Read-onlyIdempotent

Calculate preliminary candidate scores or final stable ranks from evidence snapshots and completion flags using a versioned profile, then return ranked candidates without calling predictors.

Instructions

Calculate preliminary candidate scores or final stable ranks from supplied evidence snapshots and completion flags. Use PRELIMINARY before final constraints and FINAL only after base and final constraints are complete; this does not call predictors. Returns ranked candidates and applies the versioned ranking profile to the supplied values.

Input Schema

NameRequiredDescriptionDefault
phaseYesPRELIMINARY scores incomplete work; FINAL requires completed base and final constraints.
runIdYesCaller-chosen identifier linking this call to one research run.
candidatesYesCaller-supplied candidate records; required nested fields depend on this operation.
thresholdsNoNamed score or decision cutoffs supplied by the caller.
rankingProfileVersionYesVersioned weighting profile applied to candidate scoring.
baseConstraintsCompleteYesWhether all required base constraint results are present.
finalConstraintsCompleteYesWhether required final constraint results are present for final ranking.

Output Schema

NameRequiredDescriptionDefault
okYesWhether execution completed successfully.
dataNoTool-specific result fields on success.
metaYesRun identifiers, timings, and input/output hashes.
errorNoStructured failure on unsuccessful execution.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv0.2.1
    • addedInput schema / properties / baseConstraintsComplete / description
      Added value: +"Whether all required base constraint results are present."
    • addedInput schema / properties / candidates / description
      Added value: +"Caller-supplied candidate records; required nested fields depend on this operation."
    • changedInput schema / properties / candidates / items / oneOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "agreement": {
      -        "maximum": 1,
      -        "minimum": 0,
      -        "type": "number"
      -      },
      -      "bindingQuality": {
      -        "maximum": 1,
      -        "minimum": 0,
      -        "type": "number"
      -      },
      -      "blockingReviewCondition": {
      -        "type": "boolean"
      -      },
      -      "candidateCoverage": {
      -        "maximum": 1,
      -        "minimum": 0,
      -        "type": "number"
      -      },
      -      "candidateId": {
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "candidateKey": {
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "candidateType": {
      -        "enum": [
      -          "MHCI",
      -          "MHCII"
      -        ],
      -        "type": "string"
      -      },
      -      "completeness": {
      -        "maximum": 1,
      -        "minimum": 0,
      -        "type": "number"
      -      },
      -      "consensusQuality": {
      -        "maximum": 1,
      -        "minimum": 0,
      -        "type": "number"
      -      },
      -      "missingOptionalWeightFraction": {
      -        "maximum": 1,
      -        "minimum": 0,
      -        "type": "number"
      -      },
      -      "ruleOutcomes": {
      -        "items": {
      -          "properties": {
      -            "evidenceRefs": {
      -              "items": {
      -                "minLength": 1,
      -                "type": "string"
      -              },
      -              "type": "array"
      -            },
      -            "message": {
      -              "minLength": 1,
      -              "type": "string"
      -            },
      -            "outcome": {
      -              "enum": [
      -                "PASS",
      -                "WARN",
      -                "FAIL",
      -                "NOT_EVALUATED"
      -              ],
      -              "type": "string"
      -            },
      -            "ruleId": {
      -              "minLength": 1,
      -              "type": "string"
      -            },
      -            "ruleVersion": {
      -              "minLength": 1,
      -              "type": "string"
      -            },
      -            "severity": {
      -              "enum": [
      -                "HARD",
      -                "SOFT"
      -              ],
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "ruleId",
      -            "ruleVersion",
      -            "severity",
      -            "outcome",
      -            "evidenceRefs",
      -            "message"
      -          ],
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "softWarningCount": {
      -        "maximum": 9007199254740991,
      -        "minimum": 0,
      -        "type": "integer"
      -      },
      -      "start": {
      -        "exclusiveMinimum": 0,
      -        "maximum": 9007199254740991,
      -        "type": "integer"
      -      }
      -    },
      -    "required": [
      -      "candidateId",
      -      "candidateKey",
      -      "candidateType",
      -      "bindingQuality",
      -      "consensusQuality",
      -      "candidateCoverage",
      -      "agreement",
      -      "completeness",
      -      "missingOptionalWeightFraction",
      -      "softWarningCount",
      -      "start",
      -      "blockingReviewCondition",
      -      "ruleOutcomes"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "agreement": {
      -        "maximum": 1,
      -        "minimum": 0,
      -        "type": "number"
      -      },
      -      "blockingReviewCondition": {
      -        "type": "boolean"
      -      },
      -      "candidateId": {
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "candidateKey": {
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "candidateType": {
      -        "const": "BCELL",
      -        "type": "string"
      -      },
      -      "completeness": {
      -        "maximum": 1,
      -        "minimum": 0,
      -        "type": "number"
      -      },
      -      "missingOptionalWeightFraction": {
      -        "maximum": 1,
      -        "minimum": 0,
      -        "type": "number"
      -      },
      -      "predictorMean": {
      -        "maximum": 1,
      -        "minimum": 0,
      -        "type": "number"
      -      },
      -      "ruleOutcomes": {
      -        "items": {
      -          "properties": {
      -            "evidenceRefs": {
      -              "items": {
      -                "minLength": 1,
      -                "type": "string"
      -              },
      -              "type": "array"
      -            },
      -            "message": {
      -              "minLength": 1,
      -              "type": "string"
      -            },
      -            "outcome": {
      -              "enum": [
      -                "PASS",
      -                "WARN",
      -                "FAIL",
      -                "NOT_EVALUATED"
      -              ],
      -              "type": "string"
      -            },
      -            "ruleId": {
      -              "minLength": 1,
      -              "type": "string"
      -            },
      -            "ruleVersion": {
      -              "minLength": 1,
      -              "type": "string"
      -            },
      -            "severity": {
      -              "enum": [
      -                "HARD",
      -                "SOFT"
      -              ],
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "ruleId",
      -            "ruleVersion",
      -            "severity",
      -            "outcome",
      -            "evidenceRefs",
      -            "message"
      -          ],
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "softWarningCount": {
      -        "maximum": 9007199254740991,
      -        "minimum": 0,
      -        "type": "integer"
      -      },
      -      "start": {
      -        "exclusiveMinimum": 0,
      -        "maximum": 9007199254740991,
      -        "type": "integer"
      -      }
      -    },
      -    "required": [
      -      "candidateId",
      -      "candidateKey",
      -      "candidateType",
      -      "predictorMean",
      -      "agreement",
      -      "completeness",
      -      "missingOptionalWeightFraction",
      -      "softWarningCount",
      -      "start",
      -      "blockingReviewCondition",
      -      "ruleOutcomes"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "agreement": {
      +        "maximum": 1,
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "bindingQuality": {
      +        "maximum": 1,
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "blockingReviewCondition": {
      +        "type": "boolean"
      +      },
      +      "candidateCoverage": {
      +        "maximum": 1,
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "candidateId": {
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "candidateKey": {
      +        "description": "Stable key identifying one epitope candidate across evidence stages.",
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "candidateType": {
      +        "description": "MHC class or candidate category this operation applies to.",
      +        "enum": [
      +          "MHCI",
      +          "MHCII"
      +        ],
      +        "type": "string"
      +      },
      +      "completeness": {
      +        "maximum": 1,
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "consensusQuality": {
      +        "maximum": 1,
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "missingOptionalWeightFraction": {
      +        "maximum": 1,
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "ruleOutcomes": {
      +        "description": "Previously computed rule outcomes supporting an explanation.",
      +        "items": {
      +          "properties": {
      +            "evidenceRefs": {
      +              "items": {
      +                "minLength": 1,
      +                "type": "string"
      +              },
      +              "type": "array"
      +            },
      +            "message": {
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "outcome": {
      +              "enum": [
      +                "PASS",
      +                "WARN",
      +                "FAIL",
      +                "NOT_EVALUATED"
      +              ],
      +              "type": "string"
      +            },
      +            "ruleId": {
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "ruleVersion": {
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "severity": {
      +              "enum": [
      +                "HARD",
      +                "SOFT"
      +              ],
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "ruleId",
      +            "ruleVersion",
      +            "severity",
      +            "outcome",
      +            "evidenceRefs",
      +            "message"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "softWarningCount": {
      +        "maximum": 9007199254740991,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "start": {
      +        "exclusiveMinimum": 0,
      +        "maximum": 9007199254740991,
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "candidateId",
      +      "candidateKey",
      +      "candidateType",
      +      "bindingQuality",
      +      "consensusQuality",
      +      "candidateCoverage",
      +      "agreement",
      +      "completeness",
      +      "missingOptionalWeightFraction",
      +      "softWarningCount",
      +      "start",
      +      "blockingReviewCondition",
      +      "ruleOutcomes"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "agreement": {
      +        "maximum": 1,
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "blockingReviewCondition": {
      +        "type": "boolean"
      +      },
      +      "candidateId": {
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "candidateKey": {
      +        "description": "Stable key identifying one epitope candidate across evidence stages.",
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "candidateType": {
      +        "const": "BCELL",
      +        "description": "MHC class or candidate category this operation applies to.",
      +        "type": "string"
      +      },
      +      "completeness": {
      +        "maximum": 1,
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "missingOptionalWeightFraction": {
      +        "maximum": 1,
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "predictorMean": {
      +        "maximum": 1,
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "ruleOutcomes": {
      +        "description": "Previously computed rule outcomes supporting an explanation.",
      +        "items": {
      +          "properties": {
      +            "evidenceRefs": {
      +              "items": {
      +                "minLength": 1,
      +                "type": "string"
      +              },
      +              "type": "array"
      +            },
      +            "message": {
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "outcome": {
      +              "enum": [
      +                "PASS",
      +                "WARN",
      +                "FAIL",
      +                "NOT_EVALUATED"
      +              ],
      +              "type": "string"
      +            },
      +            "ruleId": {
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "ruleVersion": {
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "severity": {
      +              "enum": [
      +                "HARD",
      +                "SOFT"
      +              ],
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "ruleId",
      +            "ruleVersion",
      +            "severity",
      +            "outcome",
      +            "evidenceRefs",
      +            "message"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "softWarningCount": {
      +        "maximum": 9007199254740991,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "start": {
      +        "exclusiveMinimum": 0,
      +        "maximum": 9007199254740991,
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "candidateId",
      +      "candidateKey",
      +      "candidateType",
      +      "predictorMean",
      +      "agreement",
      +      "completeness",
      +      "missingOptionalWeightFraction",
      +      "softWarningCount",
      +      "start",
      +      "blockingReviewCondition",
      +      "ruleOutcomes"
      +    ],
      +    "type": "object"
      +  }
      +]
    • addedInput schema / properties / finalConstraintsComplete / description
      Added value: +"Whether required final constraint results are present for final ranking."
    • addedInput schema / properties / phase / description
      Added value: +"PRELIMINARY scores incomplete work; FINAL requires completed base and final constraints."
    • addedInput schema / properties / rankingProfileVersion / description
      Added value: +"Versioned weighting profile applied to candidate scoring."
    • addedInput schema / properties / runId / description
      Added value: +"Caller-chosen identifier linking this call to one research run."
    • addedInput schema / properties / thresholds / description
      Added value: +"Named score or decision cutoffs supplied by the caller."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": {},
      +  "properties": {
      +    "data": {
      +      "additionalProperties": {},
      +      "description": "Tool-specific result fields on success.",
      +      "properties": {},
      +      "type": "object"
      +    },
      +    "error": {
      +      "additionalProperties": false,
      +      "description": "Structured failure on unsuccessful execution.",
      +      "properties": {
      +        "category": {
      +          "type": "string"
      +        },
      +        "code": {
      +          "type": "string"
      +        },
      +        "details": {
      +          "additionalProperties": {},
      +          "properties": {},
      +          "type": "object"
      +        },
      +        "message": {
      +          "type": "string"
      +        },
      +        "retryable": {
      +          "type": "boolean"
      +        }
      +      },
      +      "required": [
      +        "code",
      +        "category",
      +        "message",
      +        "retryable"
      +      ],
      +      "type": "object"
      +    },
      +    "meta": {
      +      "additionalProperties": {},
      +      "description": "Run identifiers, timings, and input/output hashes.",
      +      "properties": {
      +        "completedAt": {
      +          "type": "string"
      +        },
      +        "durationMs": {
      +          "type": "number"
      +        },
      +        "inputHash": {
      +          "type": "string"
      +        },
      +        "outputHash": {
      +          "type": "string"
      +        },
      +        "requestId": {
      +          "type": "string"
      +        },
      +        "runId": {
      +          "type": "string"
      +        },
      +        "startedAt": {
      +          "type": "string"
      +        },
      +        "toolName": {
      +          "type": "string"
      +        },
      +        "toolVersion": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "requestId",
      +        "runId",
      +        "toolName",
      +        "toolVersion",
      +        "startedAt",
      +        "inputHash"
      +      ],
      +      "type": "object"
      +    },
      +    "ok": {
      +      "description": "Whether execution completed successfully.",
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "ok",
      +    "meta"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.2.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint, so safety is covered. The description adds real behavioral context beyond them: the tool is a pure function over caller-supplied values, applies a versioned profile, and enforces a phase/completion precondition before final ranking.

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 verb and resource, then the phase rule and the no-predictor caveat. The second sentence is slightly packed, but nothing is wasted.

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 7-parameter tool with nested candidate unions, an output schema and annotations, the description covers the decisive facts: what is computed, the precondition for FINAL, and that predictors are not invoked. Details of candidate fields and thresholds are left to the schema, which documents them fully.

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 the schema already documents phase, runId, rankingProfileVersion and the completion flags. The description reinforces the phase and profile semantics but adds no meaning for thresholds or for the two distinct candidate shapes (MHC vs BCELL). Baseline 3 is appropriate.

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?

States a specific verb and resource: it calculates preliminary scores or final stable ranks from supplied evidence snapshots and completion flags. An agent can distinguish this from compute_consensus or categorize_candidates, though it never names a sibling explicitly to sharpen that contrast.

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?

Gives explicit gating: PRELIMINARY before final constraints, FINAL only after base and final constraints are complete. It also rules out a wrong expectation with 'this does not call predictors', which steers the agent to the predict_* tools for that work. No named alternative tool, so not a 5.

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