Skip to main content
Glama

validate_query

Read-only

Validate ServiceNow encoded queries before execution to catch syntax errors, length violations, and common mistakes like = vs ^. Returns 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 state readOnlyHint=true; the description adds behavioral detail by listing what is validated (javascript: expressions, allowlist, length limits, common mistakes) and the return shape. This goes beyond the annotation baseline, though it does not disclose all potential edge cases or authorization requirements.

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, tightly-written sentence that front-loads the main action, includes concrete examples of validation checks, and states the return value. No wasted words.

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, clear annotations), the description covers purpose, usage timing, return format, and validation specifics. It is fully sufficient for an agent to select and invoke the tool correctly without an output schema.

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 coverage is 100% with a good example and description for the 'query' parameter. The tool description adds some context about common mistakes but does not significantly expand parameter semantics beyond the schema, so the baseline of 3 applies.

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 a specific verb 'Lint-check' and identifies the resource as 'ServiceNow encoded query', with the scope 'BEFORE running it'. It clearly distinguishes from siblings like query_records or fluent_query by emphasizing validation rather than execution.

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?

It explicitly states when to use the tool ('BEFORE running it'), implying a pre-execution validation step. However, it does not mention alternatives or exclusions, such as 'use query_records for actual execution', so it lacks explicit comparative guidance.

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/servicenow-mcp'

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