Skip to main content
Glama
Bigred97

Australian Prudential Regulation Authority

top_n

Retrieves the top or bottom N rows by a chosen measure from APRA datasets, enabling ranking of entities by capital, members, or other metrics.

Instructions

Return the N rows with the largest (or smallest) value of a measure.

The single most common agent workflow: "show me the top 10 X by Y". top_n does the rank server-side and returns only the requested rows.

Examples: # Biggest 10 banks by total capital, latest quarter top_n("ADI_KEY_STATS", "total_capital", n=10, filters={"period": "2025-12-31"})

# Most members per super fund (latest)
top_n("SUPER_FUND_LEVEL", "total_member_accounts", n=10,
      filters={"period": "2025-12-31"})

# 5 lowest CET1 ratios in the latest quarter
top_n("ADI_KEY_STATS", "cet1_ratio", n=5, direction="bottom",
      filters={"period": "2025-12-31"})

Returns: DataResponse with at most n records, sorted by measure in the requested direction. Other fields match get_data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataset_idYesCurated dataset ID.
measureYesPlain-English measure key to rank by. Use describe_dataset() to see available measures.
nNoHow many top (or bottom) rows to return.
filtersNoOptional dimension filters, same shape as get_data. Typically you'll pin a single period to make rank meaningful (e.g. {'period': '2025-12-31'} for the latest quarter).
directionNo'top' returns the N rows with the LARGEST measure values (biggest bank, highest capital, largest fund). 'bottom' returns the SMALLEST.top

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataset_idYes
dataset_nameYes
queryNo
periodNo
unitNo
row_countNo
recordsNo
csvNo
sourceNoAustralian Prudential Regulation Authority
attributionNoSource: Australian Prudential Regulation Authority. Licensed under Creative Commons Attribution 3.0 Australia (https://creativecommons.org/licenses/by/3.0/au/).
retrieved_atYes
apra_urlYes
download_urlNo
frameworkNo
staleNo
stale_reasonNo
server_versionNo
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. It discloses that ranking is done server-side, only requested rows are returned, and output matches get_data. It does not mention any destructive behavior, which is appropriate for a read-only tool.

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 extremely concise, with a clear opening sentence, bulleted examples, and a returns section. Every sentence adds value, and no extraneous information is present.

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?

Given the tool has 5 parameters, 2 required, and an output schema, the description fully covers the behavior: ranking logic, server-side execution, output format, and integration with get_data. It is complete for effective agent use.

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 description coverage is 100%, so the baseline is 3. The description adds value by providing illustrative examples that show how parameters like direction, filters, and n are used in context, enhancing understanding beyond schema descriptions.

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 returns the N rows with the largest or smallest value of a measure. It distinguishes itself from sibling tools by emphasizing server-side ranking and returning only requested rows, and provides a common use case.

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 clear context on when to use the tool ('show me the top 10 X by Y') and provides multiple examples. While it does not explicitly exclude alternatives, it implies its use case effectively.

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/Bigred97/apra-mcp'

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