Skip to main content
Glama

validate_query

Read-only

Check ServiceNow encoded queries for errors before execution. Validates JavaScript expressions, length limits, and common mistakes like using = instead of ^ to prevent query failures.

Instructions

Lint-check a ServiceNow encoded query BEFORE running it: validates javascript: expressions against the safe function allowlist, length limits, and common mistakes (e.g. using = instead of ^, raw spaces). Returns { valid, issues, suggestions }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe encoded query to validate, e.g. "active=true^priority=1^ORDERBYDESCsys_created_on"
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, confirming no side effects. The description adds behavioral detail by listing the validation checks (safe function allowlist, length limits, common mistakes) and the output structure, enhancing transparency beyond annotations.

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 a single, well-structured sentence that front-loads the key action and efficiently includes an example and return type. Every part contributes value without redundancy.

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

Completeness5/5

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

Given the tool's simplicity (one parameter, no output schema, clear annotations), the description covers the validation behavior, common errors, and return format comprehensively. It is sufficient for an agent to understand the tool's purpose and usage.

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?

The input schema already provides a clear description and example for the 'query' parameter, achieving 100% coverage. The tool description does not add new meaning or constraints to the parameter itself, meeting the baseline but not exceeding it.

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 clearly states the tool validates a ServiceNow encoded query before execution, listing specific validation checks (javascript expressions, length limits, common mistakes) and the return format. It distinguishes from related sibling tools like 'validate_artifact' or 'validate_deployment' by focusing on queries.

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?

The description explicitly says 'BEFORE running it,' indicating the intended use case for pre-execution validation. It provides examples of mistakes but does not mention when not to use it or alternative validation tools, leaving some room for improvement.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aartiq/nowaikit'

If you have feedback or need assistance with the MCP directory API, please join our Discord server