Skip to main content
Glama
gca-global

Qobrix CRM MCP Server

by gca-global

qobrix_aggregate

Compute sum, average, min, max, or count of Qobrix numeric fields across matching records, optionally grouped for top-N buckets.

Instructions

Sum / avg / min / max / count of a numeric field across all matching records — optionally grouped by another field (top-N buckets). Paginates server-side (cap 20,000 rows) and computes in-process, which is how to get totals on Qobrix fields the API won't sort. Example uses: Total 2026 closed-sale volume: resource='contracts', field='final_selling_price_amount', op='sum', search='contract_type == "cos" and contract_status == "agreed" and date_of_contract >= "2026-01-01" and date_of_contract < "2027-01-01"'. Agent leaderboard by volume: same search, group_by='commission_to_2', top=5. Average list price by property type: resource='properties', field='list_selling_price_amount', op='avg', group_by='property_type', search='status == "available"'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
opYesAggregation: 'sum' total, 'avg' mean, 'min'/'max' extremes, 'count' rows with a non-empty value.
topNoWhen group_by is set, number of top buckets to return (default 10, max 50). Buckets sorted by op desc.
fieldYesNumeric field to aggregate (e.g. 'final_selling_price_amount', 'commission_value_amount', 'list_selling_price_amount'). For op='count', any field works (only non-null values are counted).
searchNoHard-filter Qobrix search expression (server-side precision). Operators: == != <> < > <= >=, contains, starts with, ends with, in [...], not in, ranges in a..b, and/or/not. Functions: DISTANCE_FROM, IN_POLYGON, TRANSLATED, MIN/MAX, DAYS_AGO(n), MONTHS_AGO(n), DAYS_FROM_NOW(n). Shortcuts: NOW, TODAY, THIS_WEEK, LAST_MONTH, THIS_YEAR, CURRENT_USER. Strings double-quoted; booleans true/false; association paths e.g. SalespersonUsers.Contacts.country. Example: status == "available" and sale_rent == "for_sale" and list_selling_price_amount <= 500000. For the full grammar + field cheatsheets call qobrix_search_dsl_help. For enum values call qobrix_get_field_options; for all fields call qobrix_get_schema.
resolveNoIf true and group_by looks like a UUID FK (or any dim of a multi-dim group_by does), resolve bucket keys to readable names. Defaults to true when any dim is in the always-resolve set, false otherwise.
group_byNoOptional grouping. Pass a single field name (e.g. 'commission_to_2' for agent leaderboard, 'property_type' for type-mix, 'city' for geo) or an array of 2-3 fields for a multi-dimensional pivot (e.g. ['city','property_type']). Without group_by returns a single aggregate.
resourceYesResource name (case-sensitive, lowercase plural as used by Qobrix API). Values: properties, opportunities, contacts, agents, tasks, property-viewings, projects, offers, contracts, calls, meetings, email-messages.
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well by disclosing server-side pagination with a 20,000-row cap and in-process computation. This goes beyond schema info. It does not mention what happens when the cap is exceeded or any side effects, but for a read-only aggregation tool these are relatively minor gaps.

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 front-loaded with the core function, followed by behavioral details and three illustrative examples. It is longer than a minimal description but every sentence contributes meaningful information, making it well-structured and 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?

The description covers purpose, behavior, and parameters comprehensively with examples. However, since there is no output schema, it does not explicitly describe the return format (single aggregate vs. bucket list), nor does it address behavior when pagination cap of 20,000 rows is reached. These omissions leave some context incomplete for a complex aggregation tool.

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 description coverage is 100%, and each parameter already has detailed semantics (op enum, search DSL, group_by, resolve, resource list). The tool description adds value through examples but does not introduce new parameter meaning beyond what the schema provides; it reinforces usage rather than expanding semantics.

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 the tool's function: aggregating a numeric field via sum/avg/min/max/count across records, with optional grouping and top-N buckets. It provides concrete examples (total 2026 closed-sale volume, agent leaderboard, average list price) that distinguish it from sibling list/search tools and specialized aggregation tools like qobrix_count or qobrix_top_values.

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 explicitly mentions 'which is how to get totals on Qobrix fields the API won't sort', giving a clear when-to-use signal. Multiple examples illustrate real use cases. However, it does not explicitly state when not to use it or name alternative tools for simpler counts or time-series aggregations, so it stops short of full exclusions.

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/gca-global/qobrix-crm-mcp'

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