Skip to main content
Glama

query_directory_users

Read-only

Queries users from a Caspio directory. Directories are tables with authentication and identity capabilities enabled, supporting Caspio-native authentication and SAML-based federation. This tool returns only the directory-designated fields plus three system attributes not available through regular table queries: _status ('Active', 'Inactive', 'ActivationPending', 'ActivationExpired', 'Locked', 'Suspended', 'PasswordExpired'), _sign_in_method (e.g., 'Caspio' or an external SAML provider), and _2fa_status ('Enabled', 'Disabled', 'Unavailable'). These system attributes can be used in SELECT, WHERE, ORDER BY, and GROUP BY clauses. The underlying table may contain additional fields (e.g., photo, date of birth, employment dates) that are only accessible through query_table using that table's Id (from discover_tables). IMPORTANT: field names are case-insensitive and must come from discover_directories' field list -- never guess. Call discover_directories first for any directory not already discovered earlier in this conversation to get its directoryId.

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: ''; 'Email, _status'; 'COUNT(*) as Total'
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)
directoryIdYesDirectory Id (e.g., 'd99357'), obtained from the discover_directories tool call -- the directory's name has no meaning for API calls; only the Id can be used here.
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.5/5.0
Behavior4/5

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

With annotations already declaring readOnlyHint=true and openWorldHint=true, the description adds value beyond annotations by clarifying the exact return scope (directory-designated fields plus three enumerated system attributes), the allowed clauses for these attributes, and the critical warning that field names are case-insensitive and must come from discover_directories – never guessed. No contradiction 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.

Conciseness4/5

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

The description is a single paragraph but front-loads the core purpose ('Queries users from a Caspio directory') and then adds necessary context in a logical order: directory definition, return fields, attribute details, alternative tool, and a safety warning. It is slightly verbose but every sentence carries useful information; the ALL-CAPS warning ensures the most critical instruction is noticed.

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 read-only tool with no output schema, the description covers the unique aspects that an agent needs: the three system attributes and their possible values, the prerequisite discovery step, and the alternative path for additional fields. Pagination and default limits are documented in the input schema, so they need not be repeated. Overall, an agent is well-equipped to invoke this tool correctly.

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%, so baseline is 3. The description adds extra meaning: it explains that directoryId is obtained from discover_directories and that 'the directory's name has no meaning for API calls'; it lists which system attributes can appear in SELECT/WHERE/ORDER BY/GROUP BY; and it warns against guessing field names. This goes beyond the schema's per-parameter documentation and compensates where the schema can't convey cross-parameter constraints.

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 opens with 'Queries users from a Caspio directory' – a specific verb+resource combination. It goes beyond by stating what it returns ('only the directory-designated fields plus three system attributes not available through regular table queries'), which distinguishes it from query_table. This explicitly differentiates the tool from siblings like query_table and query_view.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly tells when to use this tool versus query_table: 'The underlying table may contain additional fields ... that are only accessible through query_table using that table's Id (from discover_tables).' It also mandates a prerequisite for any undiscovered directory: 'Call discover_directories first for any directory not already discovered earlier in this conversation to get its directoryId.' This is model usage guidance.

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