Skip to main content
Glama

Bracket balance

bpj_bracket_balance
Read-onlyIdempotent

Check nesting of parentheses, square brackets and braces and return mismatched offsets.

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": {
      "text": "<text>"
    },
    "name": "bpj_bracket_balance"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.3/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 bar is lower. The description adds real value by disclosing the return content ('mismatched offsets'), but says nothing about how multiple mismatches are reported, whether it short-circuits, or the 6000-character input cap. Adequate, not rich.

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 no filler; every clause carries information (what is checked, which bracket types, what is returned).

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 single-parameter utility with no output schema, the description covers the essentials but leaves the return shape ambiguous — 'mismatched offsets' could mean a list of positions, counts, or a boolean plus first error. The 6000-character input constraint is also undisclosed, which matters for large source files.

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?

One parameter with 0% schema description coverage; the schema gives only a title ('Source text') and a maxLength. The description implies the input is the text whose nesting is checked but does not mention the 6000-character limit or any encoding/line-ending expectations, so it only partially compensates for the coverage gap.

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: 'Check nesting of parentheses, square brackets and braces', and adds that it returns mismatched offsets. An agent knows exactly what the tool does without opening the schema, though it does nothing to distinguish itself from any similarly named sibling.

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 when-to-use, when-not-to-use, or alternative guidance at all. The only implicit cue is that the tool is for bracket nesting specifically, leaving the agent to infer applicability from the name and one-line description.

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.