Skip to main content
Glama

UK Data: Code utilities

is_valid_parentheses

Read-onlyIdempotent

Checks if a string contains properly balanced and nested parentheses, brackets, and braces. Returns true if every opening symbol has a matching closing symbol in the correct order. (cost: 1 credit)

Input Schema

NameRequiredDescriptionDefault
sNostring, required, the input string containing parentheses/brackets/braces to validate, no units, no default

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare the tool as read-only, idempotent, non-destructive, and open-world, so the safety profile is covered. The description adds useful behavioral detail by specifying the exact return condition and the one-credit cost, though it does not address edge cases such as empty strings or non-bracket characters.

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?

The description is two short sentences plus a cost parenthetical. The validation condition is front-loaded and every sentence contributes directly to understanding the tool.

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

Completeness4/5

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

For a simple one-parameter validator with full schema coverage and no output schema, the description is largely complete because it defines the return condition. Minor edge-case behavior is omitted, but an agent has enough information to call the tool correctly.

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 100%, so the single string parameter is already fully documented in the input schema. The description adds no parameter-specific format or constraint details beyond calling it a string, which meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb, 'checks,' and a precisely scoped resource: balanced and nested parentheses, brackets, and braces. It also defines the true condition, making it clearly distinguishable from siblings such as is_palindrome or json_validate.

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

Usage Guidelines3/5

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

The intended use is implied clearly by the name and description, but there is no explicit guidance on when to choose this tool over alternatives like json_validate or validate_sudoku. No when-not-to-use conditions are given.

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.

Resources