Skip to main content
Glama
Pit Officer

Pit Officer

Official

list_accounts

Retrieve a paginated, read-only account list filtered by group, code, status, block reason, positions, P&L, and trading connection; sort and page results to inspect account access and blocks.

Instructions

Return one page of accounts; each row is the account row of the REST account list, its block joined with its group's. Read-only - no secrets, no order-flow control. Filters: group (exact group code; an empty string selects accounts in no group), code (code or title) and blockReason (text match), status (active | blocked), position (open-position count range), pnl (P&L bounds in pnl.currency) with includeUnsetPnl and includeHaltedPnl; venue is the trading-connection filter: mode any (through at least one trading connection), none (through no connection) or connection (through the connection whose id is in connection). Sort columns: blockReason, code, group, positionCount, status, title, venueAccess. Paging: limit rows per page (default 50, capped at 500) and a 1-based page; total counts the matching rows before paging. An invalid value fails with a validation error.

Input Schema

NameRequiredDescriptionDefault
pnlNoP&L bounds in one currency
codeNoAccount code or title match
pageNo1-based page number, default 1
sortNoSort order
groupNoExact group code; an empty string selects accounts in no group; omitted = any group
limitNoRows per page, default 50, capped at 500
venueNoTrading-connection filter on the account's own grants and its group's
statusNoEffective block state: active | blocked; omitted = both
positionNoOpen-position count range
blockReasonNoEffective block reason match
includeUnsetPnlNoAlso keep accounts with no P&L yet; needs pnl.currency
includeHaltedPnlNoAlso keep accounts whose P&L is halted; needs pnl.currency

Output Schema

NameRequiredDescriptionDefault
totalYes
accountsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations present, the description carries the full behavioral burden and does so well: it declares 'Read-only - no secrets, no order-flow control', explains paging defaults and caps, states that invalid values fail with a validation error, and clarifies the returned row shape. These are meaningful behavioral disclosures beyond the schema.

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 return shape and read-only guarantee, and nearly every clause carries information about filters, sorting, or paging. It is somewhat long and run-on as a single dense paragraph, but given 12 parameters and no annotations, the length is largely justified.

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 12-parameter list/filter tool with 100% schema coverage and an output schema, the description supplies the missing operational context: read-only safety, row composition, filter semantics, sort columns, paging defaults/caps, and validation behavior. Nothing critical to correct invocation appears 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 description coverage is already 100%, but the description adds useful semantics beyond it: group empty-string behavior, code matching code or title, blockReason text matching, venue mode meanings, sortable columns, and total counting before paging. It does not fully explain every nested matching option such as code fragments/anchor fields, but that is already covered by the 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?

The description states a specific verb and resource: 'Return one page of accounts', and specifies the row shape as the REST account row joined with its group's block. This clearly distinguishes it from siblings such as get_account_state, list_groups, or create_account.

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 establishes the tool's read-only nature and enumerates the filtering, sorting, and paging surface, so an agent can infer it is the list/search tool for accounts. However, it does not explicitly say when to prefer this over get_account_state or list_groups, so usage guidance is clear but not exhaustive.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.