Skip to main content
Glama

fluent_query

Read-only

Build ServiceNow queries with conditions, aggregations, sorting, and limits. Retrieve filtered records or aggregate values from any table.

Instructions

GlideQuery-style fluent query builder. Supports select, where, aggregate (COUNT/AVG/SUM/MIN/MAX), orderBy, limit, and groupBy. Returns records or aggregate results. Example: { table: "incident", where: [["active","=",true],["priority","<",3]], select: ["number","short_description"], limit: 10 }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax records to return (default: 20, max: 200)
tableYesTable name (e.g., "incident")
whereNoArray of conditions: [field, operator, value]. Operators: =, !=, >, >=, <, <=, LIKE, STARTSWITH, CONTAINS, IN, NOT IN, ISEMPTY, ISNOTEMPTY
selectNoFields to return. Supports dot-walking (e.g., "caller_id.email"). If omitted, returns all fields.
groupByNoField to group results by (for aggregate queries)
orWhereNoArray of OR conditions (same format as where)
orderByNoField to sort by. Prefix with "-" for descending.
aggregateNoAggregate operation: COUNT, AVG, SUM, MIN, MAX
displayValueNoReturn display values instead of internal values (default: false)
aggregateFieldNoField to aggregate on (required for AVG, SUM, MIN, MAX)
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, establishing safety. The description adds that the tool returns records or aggregate results, which is consistent but does not disclose additional behavioral traits (e.g., default limit, performance implications). No contradictions with 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?

Three sentences plus an example, front-loaded with the core identity. No redundant information; every sentence contributes to understanding purpose, capabilities, and usage pattern. Highly efficient.

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?

While description covers basic capabilities and provides an example, it lacks context on default behaviors (e.g., limit default 20, max 200), pagination, or performance considerations. Given the tool's complexity (10 parameters) and the presence of many sibling query tools, more contextual guidance would be helpful.

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%, providing detailed parameter descriptions. The tool description adds value with a concise example demonstrating how parameters combine (e.g., where, select, limit) and lists supported aggregate operations, enhancing semantic understanding beyond individual parameter docs.

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?

Description clearly states the tool's purpose as a 'GlideQuery-style fluent query builder' with specific supported operations (select, where, aggregate, orderBy, limit, groupBy) and return types (records or aggregate results). This distinguishes it from sibling query tools like query_records and run_aggregate_query by emphasizing its fluent style and comprehensive capabilities.

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?

No explicit guidance on when to use this tool versus alternatives. The description implies a comprehensive query capability but does not contrast with simpler query tools (e.g., query_records) or aggregate-only tools (e.g., run_aggregate_query). Lacks when-to-use or when-not-to-use criteria.

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