Skip to main content
Glama

Build a JSON Schema enum

bpj_json_schema_enum
Read-onlyIdempotent

Build a JSON Schema enum from distinct values in a nonempty array.

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": {
      "values": "<values>"
    },
    "name": "bpj_json_schema_enum"
  }
}

Input Schema

NameRequiredDescriptionDefault
valuesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.2/5.0
Behavior4/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 two behaviors beyond that: values are deduplicated to 'distinct' entries, and the array must be nonempty, implying an error on empty input. That is solid added context, though it omits ordering behavior and the output shape.

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 sentence with no filler, and the core purpose is front-loaded so an agent can parse it at a glance. It is arguably too terse for the input-format ambiguity it leaves behind, but no wording is wasted.

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 one-parameter utility with full annotation coverage and no output schema, the description covers purpose and dedup semantics adequately. However, it leaves the actual encoding of the 'values' argument unresolved, which is the one thing an agent must know to invoke it successfully.

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 parameter, so the description must carry the meaning. It calls the input a 'nonempty array', but the schema types it as a string with maxLength 3000 and a title of 'Candidate value array', leaving it unclear whether values are comma-separated, newline-delimited, or a JSON-encoded array string. The description neither resolves the conflict nor gives a syntax example.

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: 'Build a JSON Schema enum' from array values. This distinguishes it from general-purpose siblings such as bpj_json_infer_schema or bpj_json_array_unique_values, though it does not name a sibling or state the boundary explicitly. The purpose is unambiguous without opening the schema.

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?

The only guidance is an embedded precondition, 'nonempty array', which constrains the input but says nothing about when to choose this tool over the many other JSON transformation siblings. There is no when-not-to-use and no mention of alternatives.

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.