Skip to main content
Glama

Two-dimensional prefix sums

bpj_matrix_prefix_grid
Read-onlyIdempotent

At each cell report the rectangular total from the top-left corner through that cell.

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_prefix_grid"
  }
}

Input Schema

NameRequiredDescriptionDefault
matrixYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

C2.9/5.0
Behavior3/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), so the description's job is to add behavioral detail. It does add the core computational semantics and implies the output has the same cell layout as the input, but it never states the return structure explicitly, what happens on ragged or malformed input, or any handling of non-numeric values.

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?

One tight sentence with the cell-wise result stated up front and no filler. It is not padded, though the terseness comes at the cost of the missing format and usage details noted elsewhere.

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?

The tool is simple in shape (one parameter) but has no output schema and no parameter documentation, so the description should specify how the matrix is serialized and what the returned matrix looks like. It leaves both underspecified, which is inadequate given the zero structured coverage.

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

Parameters2/5

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

Schema description coverage is 0% for the single required parameter, so the description carries the burden of explaining the input. It only indirectly hints at a rectangular numeric matrix and gives no encoding example, no note that the value is a JSON string (as the schema requires), and no mention of the 12000-character limit.

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?

The description states a specific computation: for each cell, report the rectangular total from the top-left corner through that cell — that is a recognizable 2D prefix-sum operation. It is clear what the tool produces, but it never names the transformation (prefix sums/integral image) or distinguishes itself from nearby matrix siblings such as bpj_matrix_direct_sum or bpj_table_pivot_sums.

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 guidance on when to use this versus alternatives, no prerequisites, and no stated exclusions or limitations. The agent must infer applicability purely from the mathematical phrasing.

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.