Skip to main content
Glama

Check an options object

validate_options
Read-onlyIdempotent

Validates an options object before it reaches ChartWidget, Chart, or ChartWidgetGrid, catching unknown names, invalid values, misplaced options, and type issues to prevent configuration errors.

Instructions

Checks an options object before it goes to new ChartWidget, new Chart or new ChartWidgetGrid: unknown option names (with the one likely meant, and where an option of another entry point belongs), values outside the allowed ones, numbers given as strings, intervals, feature switch names, style override keys and values, and languages, nested options included. Write functions and adapters as strings; they pass.

Input Schema

NameRequiredDescriptionDefault
targetYesThe entry point: ChartWidget (the full trading UI), Chart (the headless chart) or ChartWidgetGrid (several charts).
optionsYesThe options object, as JSON.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.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 safety is covered. The description adds genuinely useful behavior beyond them: unknown names come back with the likely intended one and with a note on which other entry point an option belongs to, and nested options are checked too. The instruction that functions and adapters must be written as strings ('they pass') flags a real gotcha that no annotation covers.

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?

The tool verb and the destination constructors are front-loaded, and the long enumeration of checked categories is dense rather than padded. It is a single heavy sentence plus one short corrective clause; readable, though the middle list could be trimmed without losing meaning.

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 validation entry point with nested, free-form input and no output schema, the biggest missing piece is what a result looks like — does it return a boolean, a list of messages, or throw? The description implies errors are described but never states the return shape or whether success is silent. Everything else an agent needs (target values, what gets checked, string-only functions) is present.

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

Parameters4/5

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

Schema description coverage is 100% and the target enum is fully documented, so the baseline would be 3. The description earns more by explaining what the free-form `options` object is checked against and by calling out that nested options are included and that function/adapter values must be strings — semantics the empty `properties: {}` schema cannot convey.

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 gives a specific verb (checks/validates) and resource (an options object), and names the exact consumers it validates against: new ChartWidget, new Chart, new ChartWidgetGrid. It then enumerates the error classes it detects (unknown option names, out-of-range values, numeric strings, intervals, feature switches, style keys, languages), which makes it clearly distinct from the sibling list_* tools that only enumerate values.

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

Usage Guidelines4/5

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

"before it goes to new ChartWidget, new Chart or new ChartWidgetGrid" establishes the timing and context of use clearly. It does not explicitly route the agent (e.g. 'use list_options when you need the valid names rather than a verdict'), so alternatives are left implicit, but the use case itself is unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.