Skip to main content
Glama

query_records

Query records from any Gadget model with filtering, sorting, pagination, and field selection. Use introspection tools to discover available fields and filter shapes.

Instructions

Query records from any Gadget model. Supports filtering, sorting, pagination cursors, and field selection. Use introspect_model first to discover available fields, and introspect_filters to see valid filter shapes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYesModel name in singular camelCase, e.g. shopifyOrder, label
fieldsYesGraphQL field selection, e.g. "id name email createdAt"
filterNoFilter value — use introspect_filters to discover valid filter fields and shapes.
sortNoSort value — array of sort objects, e.g. [{ createdAt: { sortOrder: "Descending" } }]
limitNoMax records to return (default 10, max 50)
afterNoPagination cursor — pass the endCursor from a previous response to fetch the next page
Behavior3/5

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

No annotations provided; description conveys read query nature and supported operations (filtering, sorting, pagination) but lacks details on response format, error handling, or performance implications.

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?

Two concise sentences with front-loaded main purpose and no unnecessary words.

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

Completeness4/5

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

Covers main features and references introspect tools for prerequisites; missing details on return format and pagination behavior, but acceptable given complexity and no 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%; description adds context by grouping parameters under 'filtering, sorting, pagination cursors, and field selection', but does not provide syntax details beyond schema.

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 'Query records from any Gadget model', a specific verb+resource, and distinguishes from siblings like count_records and get_record by listing capabilities (filtering, sorting, pagination, field selection).

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?

Explicitly advises using introspect_model and introspect_filters first, providing usage context but not explicitly excluding alternatives (e.g., get_record for single records).

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/Stronger-eCommerce/gadget-mcp'

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