Skip to main content
Glama

Expected counts for a contingency table

bpj_matrix_contingency_expected
Read-onlyIdempotent

Compute independence-model expected cell counts from nonnegative row and column margins.

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": {
      "matrix": "<matrix>"
    },
    "name": "bpj_matrix_contingency_expected"
  }
}

Input Schema

NameRequiredDescriptionDefault
matrixYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so safety and repeatability are covered. The description adds a genuine input constraint, nonnegative margins, and names the statistical model used. It says nothing about degenerate cases such as zero margins, which would make expected counts or division undefined.

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?

A single sentence with no filler, with the operation and the model front-loaded. It is efficient, though the brevity contributes to the input ambiguity rather than resolving it.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a one-parameter tool with no output schema, so the description is the only source for the return shape, and it does not say whether the result is a matrix of the same dimensions, whether it is JSON or a string, or how margins are derived from the input. Combined with the matrix-versus-margins ambiguity, an agent cannot reliably call it without guessing.

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 0%, so the description carries the burden, and it only partly does. It adds the nonnegativity requirement, but it describes the input as row and column margins while the sole parameter is named 'matrix' with title 'Rectangular numeric matrix (JSON)'. Whether the agent should pass the observed contingency table or a precomputed margin structure is left ambiguous.

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 result: compute independence-model expected cell counts. The statistical operation is distinct from the matrix-algebra siblings, so an agent can tell what the tool produces. It does not name or contrast a sibling, but the purpose itself is unambiguous.

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

Usage Guidelines2/5

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

There is no explicit when-to-use or when-not-to-use guidance, and no alternative is named (for example a contingency review or count-summary sibling). The intended pipeline position, as a chi-square style expected-count step, must be inferred from the phrase 'independence-model'.

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.