Skip to main content
Glama

Query site records

query_site_records
Read-onlyIdempotent

Use when the user asks who signed up, what was submitted, or wants to see the responses. Queries a collection's append-only records (newest-first by default). Filter with where (field/value equality), set order (asc|desc) and limit. Each record carries its server-stamped actor. Records carry created; filter by date yourself and page with limit. Scoped to a site you can edit.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "site_id": "<site_id>",
      "collection": "<collection>"
    },
    "name": "query_site_records"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax records to return (capped at 200)
orderNoSort by creation time
whereNoEquality filters on record fields
site_idYesThe site that owns the collection
collectionYesThe collection to query
workspace_idNoOptional: the workspace to act in, from list_workspaces (the connection reaches the person's personal space and every workspace they are a member of). Required on a write when the connection reaches more than one workspace. Omit to act in the personal space (for an older single-workspace connection, the one workspace it was authorized for).
latest_per_keyNoFold edit events to the newest record per logical `key` field (current state), instead of the full history

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / workspace_id / description
      Previous value: -"Optional: the workspace (the personal space or a Pro workspace) to act in, from list_workspaces. Omit to act in the token owner's own account."New value: +"Optional: the workspace to act in, from list_workspaces (the connection reaches the person's personal space and every workspace they are a member of). Required on a write when the connection reaches more than one workspace. Omit to act in the personal space (for an older single-workspace connection, the one workspace it was authorized for)."
  2. First observed

TDQS

A3.6/5.0
Behavior3/5

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

The readOnlyHint, idempotentHint and destructiveHint annotations already establish the safety profile, so the bar is lower; the description still adds real value by disclosing newest-first ordering, append-only semantics, and server-stamped actors on each record. However, it does not disclose the key auth constraint behind 'Scoped to a site you can edit' (what happens on a permission failure) or that a multi-workspace connection behaves differently, which is the most consequential behavior for an agent to get right.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is front-loaded with the user-intent trigger before mechanics, and each sentence carries a distinct operational fact without waste. The telegraphic style ('Filter with `where`... set `order`... and `limit`') slightly duplicates the schema, but nothing is padding.

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?

For a 7-parameter, read-only, no-output-schema query tool, the description covers default ordering, append-only semantics, date handling, paging, and permission scoping. The omission of `latest_per_key` and multi-workspace `workspace_id` behavior keeps it from being fully sufficient, since an agent could easily call this expecting current state and get full history.

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?

With 100% schema description coverage the schema already documents every parameter, so baseline 3 applies; the description reinforces `where` as equality, `order` as asc|desc, and `limit` as a paging control, which is marginal added meaning rather than new information. It is silent on the non-obvious `latest_per_key` fold-history behavior and on `workspace_id` scoping, leaving the two most easily misused parameters to the schema alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource ('Queries a collection's append-only records') plus the user intents it serves ('who signed up, what was submitted, or wants to see the responses'), which clearly separates it from mutation siblings like delete_site_record or set_site_data. It stops short of naming an alternative query/export tool, so differentiation is by implication only.

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 gives concrete when-to-use triggers tied to user phrasing, and adds operational guidance on filtering and paging ('filter by date yourself and page with `limit`'). It never states when not to use it or names a sibling (e.g. export_site_data) for bulk-retrieval cases, so the guidance is clear but incomplete.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.