interpret_scores
Generate a statistical breakdown of raw prediction scores, providing count, mean, std, min, max, and per-value normalized data. Accepts floats (0.0–1.0) or Q0.16 integers (0–65535).
Instructions
Analyze raw prediction scores with statistical breakdown — no API call, no auth, no credits. Response: { count, mean, std, min, max, breakdown: [{ index, raw, normalized }] }. Accepts floats (0.0–1.0) or Q0.16 integers (0–65535) — auto-detects. For full stability classification (Stable/Drift/Flip/Collapse), pass scores to the evaluate tool instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scores | Yes | Array of scores — floats (0.0–1.0) or Q0.16 integers (0–65535) |
Implementation Reference
- src/index.ts:825-866 (handler)The interpret_scores tool handler. Accepts an array of scores (float or Q0.16), computes count/mean/std/min/max, and returns a per-index breakdown with raw and normalized values. No API call, no auth required.
server.tool( "interpret_scores", "Analyze raw prediction scores with statistical breakdown — no API call, no auth, no credits. Response: { count, mean, std, min, max, breakdown: [{ index, raw, normalized }] }. Accepts floats (0.0–1.0) or Q0.16 integers (0–65535) — auto-detects. For full stability classification (Stable/Drift/Flip/Collapse), pass scores to the evaluate tool instead.", { scores: z.array(z.number().min(0).max(65535)).min(1).max(300).describe("Array of scores — floats (0.0–1.0) or Q0.16 integers (0–65535)"), }, async ({ scores }) => { const q16 = toQ16(scores); const normalized = q16.map((s) => Math.min(s, Q16) / Q16); const mean = normalized.reduce((a, b) => a + b, 0) / normalized.length; const std = Math.sqrt(normalized.reduce((a, b) => a + (b - mean) ** 2, 0) / normalized.length); const min = Math.min(...normalized); const max = Math.max(...normalized); const breakdown = normalized.map((n, i) => ({ index: i, raw: q16[i], normalized: Number(n.toFixed(4)), })); return { content: [ { type: "text" as const, text: JSON.stringify( { count: q16.length, mean: Number(mean.toFixed(4)), std: Number(std.toFixed(4)), min: Number(min.toFixed(4)), max: Number(max.toFixed(4)), breakdown, note: "For stability classification (Stable/Drift/Flip/Collapse), run these through the evaluate tool.", }, null, 2 ), }, ], }; } ); - src/index.ts:829-829 (schema)Zod input schema for interpret_scores. Accepts an array of 1–300 numbers between 0 and 65535 (covers both floats and Q0.16).
scores: z.array(z.number().min(0).max(65535)).min(1).max(300).describe("Array of scores — floats (0.0–1.0) or Q0.16 integers (0–65535)"), - src/index.ts:825-866 (registration)Registration of interpret_scores via server.tool() on the MCP server object. Registers it under the name "interpret_scores".
server.tool( "interpret_scores", "Analyze raw prediction scores with statistical breakdown — no API call, no auth, no credits. Response: { count, mean, std, min, max, breakdown: [{ index, raw, normalized }] }. Accepts floats (0.0–1.0) or Q0.16 integers (0–65535) — auto-detects. For full stability classification (Stable/Drift/Flip/Collapse), pass scores to the evaluate tool instead.", { scores: z.array(z.number().min(0).max(65535)).min(1).max(300).describe("Array of scores — floats (0.0–1.0) or Q0.16 integers (0–65535)"), }, async ({ scores }) => { const q16 = toQ16(scores); const normalized = q16.map((s) => Math.min(s, Q16) / Q16); const mean = normalized.reduce((a, b) => a + b, 0) / normalized.length; const std = Math.sqrt(normalized.reduce((a, b) => a + (b - mean) ** 2, 0) / normalized.length); const min = Math.min(...normalized); const max = Math.max(...normalized); const breakdown = normalized.map((n, i) => ({ index: i, raw: q16[i], normalized: Number(n.toFixed(4)), })); return { content: [ { type: "text" as const, text: JSON.stringify( { count: q16.length, mean: Number(mean.toFixed(4)), std: Number(std.toFixed(4)), min: Number(min.toFixed(4)), max: Number(max.toFixed(4)), breakdown, note: "For stability classification (Stable/Drift/Flip/Collapse), run these through the evaluate tool.", }, null, 2 ), }, ], }; } );