Skip to main content
Glama

query_cube

Retrieve data from a Saudi economy data cube by specifying drilldowns and measures. Filter by member ID, set language, and paginate results.

Instructions

Query a cube by drilldowns (level names) + measures; returns a compact, paginated result with the resolved query echoed back.

cut filters by member: a {level: member_id} mapping, e.g. {"Province": "1"} to keep only that province. Use the member ID (from describe_cube(cube, level=...)), NOT its caption. locale ('en' or 'ar') sets the language of member captions in the result rows (e.g. 'الرياض' vs 'Al-Riyadh'); member IDs and numbers are unaffected. Validates level/measure names AND cut level names locally and fails loud with the valid options.

limit: max rows per call (default 100), HARD-CAPPED at 5000. A larger value is silently reduced to 5000 - the tool will NOT return an unbounded result, because a single result over ~1MB is rejected outright by the client (no partial data comes back). THERE IS NO 'get everything in one call'. To get more than one page, do NOT raise limit: page with offset (the note gives you the next offset; repeat until complete), OR narrow with a cut / fewer drilldowns. Paging or narrowing is the intended path and is faster than one giant call that errors. offset: start row of this page (default 0). When combining pages, only sum additive measures (counts/sums); never average an index or ratio across pages.

Note: a cut on a valid level but nonexistent member returns 0 rows (reported as 'valid query, no matching data'), not an error - check the member id if you expected rows.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cutNo
cubeYes
limitNo
localeNoen
offsetNo
measuresYes
drilldownsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations, description fully discloses behaviors: cut on nonexistent member returns 0 rows, locale only affects captions, limit hard-capped at 5000, silent reduction, pagination via offset, error on large result, and warning against averaging across pages. Thorough and honest.

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?

Well-structured with paragraphs, bolding, and clear warnings. Every sentence adds value, though slightly lengthy. Could be more concise but remains effective and easy to parse.

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?

Covers all 7 parameters, pagination, error cases, integration with describe_cube, and output schema existence. Complete for an AI agent to use correctly without further clarification.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Since schema description coverage is 0%, description compensates by providing detailed semantics for all parameters: cut format, locale values, limit/offset pagination, and measures/drilldowns as arrays. Adds meaning 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?

Clearly states the tool queries a cube with drilldowns and measures, returning paginated results. Distinguishes from siblings (describe_cube, list_cubes) implicitly by focusing on data retrieval.

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?

Provides explicit guidance on when to use pagination, cut, locale, limit, and offset. Warns against raising limit beyond 5000 and explains paging vs narrowing. Could be more explicit about when to use this tool versus describe_cube, but context is clear.

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/mohsinmshabbir/datasaudi-mcp'

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