Skip to main content
Glama

validate_query

Read-only

Validate ServiceNow encoded queries before execution. Check for unsafe functions, length limits, and common syntax mistakes, then get issues and suggestions.

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=true, covering safety. The description adds valuable behavioral context beyond that: mentions validation of javascript: expressions against an allowlist, length limits, and common mistakes, plus the exact return shape. This is meaningful for an agent understanding what the tool does internally.

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 sentences, front-loaded with the core purpose, and contains no filler. Every clause adds information: what it checks, when to use it, and what it returns. This is a model of conciseness.

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?

Despite having no output schema, the description specifies the return format ({ valid, issues, suggestions }). It explains the key validation aspects and gives concrete examples of common mistakes. For a single-parameter read-only tool with good annotations, this is complete enough for an agent to invoke it 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?

The only parameter 'query' is fully described in the schema with an example, giving 100% coverage. The description does not add extra parameter-level semantics beyond what the schema provides, so the baseline of 3 is appropriate.

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 uses the specific verb 'Lint-check' and targets a clear resource: 'ServiceNow encoded query' BEFORE running it. It also distinguishes itself from sibling query tools like query_records or fluent_query by focusing on validation rather than execution, and mentions specific checks (javascript: expressions, length limits, common mistakes).

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 states when to use the tool: 'BEFORE running it', implying it is a pre-flight check. It gives clear context for the use case but does not mention when not to use it or explicitly name alternatives among the many sibling tools, so it falls just short of a 5.

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