Skip to main content
Glama

query_view

Read-only

Queries records from a Caspio view. Views are predefined data sources that can filter a single table or join multiple tables. The query syntax is identical to querying tables -- the backend supports Microsoft SQL Server WHERE syntax (LIKE, AND, OR, NOT, IN, BETWEEN, comparison operators, etc.). Returns a JSON object with a 'records' array of flat key-value objects where keys are field names, and optional 'pagination' metadata when getPaginationInfo is true. Maximum 1000 records per request (default 100). For larger result sets, use pageNumber and pageSize to paginate. IMPORTANT: field names are case-insensitive and must come from discover_views' field list -- never guess a field name from its label or from naming conventions. Call discover_views first for any view not already discovered earlier in this conversation to get its viewId.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of records returned (skipped when pageNumber or pageSize is not empty, max = 1000, default = 100).
whereNoWHERE clause. Examples: 'YesNoBoolField=1'; 'NumField=123 AND (StrField=N'Abc' OR DateField<='2001-01-31 23:59:59')'; 'Name = N'O''Brien'' (N prefix denotes Unicode, use '' to escape single quotes)'
selectYesSELECT field list (required). Use '*' to return all fields (safe default). Examples: ''*; 'PK_ID'; 'Field1, Field2'; 'COUNT(*) as Total'
viewIdYesView Id (obtained from discover_views, e.g. 'v12345') -- the view's name has no meaning for API calls; only the Id can be used here.
groupByNoGROUP BY clause. Use when grouping results by specific fields with aggregate functions. Examples: 'PK_ID', 'Field1, Field2'
orderByNoORDER BY clause. Examples: 'PK_ID', 'Field1 ASC, Field2 DESC'
pageSizeNoNumber of records per page (possible values from 5 to 1000, default = 25)
pageNumberNoPage number (default = 1)
getPaginationInfoNoReturn pagination info (total_count, page_size, page_number) in a 'pagination' object. Default is false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds substantial behavioral detail: return shape ('records' array of flat key-value objects), pagination metadata behavior, maximum/default record counts, SQL syntax support, case-insensitive field names, and the discover_views prerequisite. This goes well beyond the 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?

The description is dense but well-organized: it opens with the core purpose, then covers output format, limits, pagination, and ends with the critical prerequisite. Every sentence contributes operational value, and the IMPORTANT warning is appropriately highlighted.

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?

For a complex SQL-like query tool with nine parameters and no output schema, the description is remarkably complete. It explains the return structure, pagination metadata, record limits, SQL syntax, field-name sourcing, and the discover_views prerequisite. Nothing essential for correctly invoking the tool is missing.

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 coverage is 100% with detailed per-parameter descriptions, so the baseline is 3. The description adds meaningful cross-parameter guidance: field names must come from discover_views' field list, viewId is required rather than the view name, and pagination semantics tie pageNumber/pageSize to larger result sets. This enhances parameter understanding beyond the schema.

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 clearly states a specific action ('Queries records') and resource ('Caspio view') and explains what a view is. It does not explicitly differentiate query_view from its sibling query_table, so an agent must infer the distinction from the tool names and the view/table framing.

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 gives concrete usage context: call discover_views first, use pagination for large result sets, and avoid guessing field names. It does not explicitly say when to prefer query_view over query_table or other siblings, but the view-versus-table distinction is clear enough from the opening sentence.

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.

Resources