Skip to main content
Glama

Block diagonal matrix assembly

bpj_matrix_direct_sum
Read-onlyIdempotent

Place two rectangular matrices on a block diagonal and fill off-diagonal blocks with zeros.

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>",
      "other": "<other>"
    },
    "name": "bpj_matrix_direct_sum"
  }
}

Input Schema

NameRequiredDescriptionDefault
otherYes
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 the safety profile is covered. The description adds the meaningful behavioral detail that off-diagonal blocks are zero-filled, but says nothing about the resulting matrix dimensions, block ordering, or what happens with ragged/invalid input.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with the core operation first and the zero-fill detail second. Nothing is padded or repeated.

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

Completeness3/5

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

For a simple two-input math tool with full annotation coverage and no output schema, the description is adequate to identify the operation. However, the block-placement order and the JSON-string input format are omitted, which are the details an agent most needs to call it correctly.

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%, so the description carries the burden, yet it only says 'two rectangular matrices' without stating which parameter occupies which block (top-left vs bottom-right) or that the inputs are JSON-encoded strings capped at 12000 characters. The ordering ambiguity of 'matrix' vs 'other' is a genuine semantic gap for this operation.

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 gives a specific verb and resource ('Place two rectangular matrices on a block diagonal') plus the zero-fill behavior, so an agent knows exactly the operation. It does not name or contrast with siblings such as bpj_matrix_multiply or bpj_sheet_diagonal_cells, but the operation is distinctive enough to be told apart.

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 guidance on when to use this versus other matrix-assembly siblings, no prerequisites, and no note on constraints (e.g., that both inputs must be numeric JSON arrays of matching dimension type). Usage must be inferred entirely from the operation name and one sentence.

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.