Skip to main content
Glama
altfndata

altfinance-mcp

by altfndata

query_table

Read-only

Query a known auction data table with filters, sorting, field selection, and pagination to return exact item records.

Instructions

Query one known table with precise filtering, sorting, and field selection.

Use this when you already know the target table (from list_tables) and want exact control — e.g. "the 10 most expensive Rolex watches sold since 2020" becomes table="watches", filters on designer/sale_date, sort by usd_price_decimal desc, limit 10. If you don't know which table holds the item, use search (whole-market) instead; for aggregate figures (median, percentiles) use market_stats.

Args: table: Table alias (call list_tables for the full set). "gems" = loose stones (use for gemstone valuations); "jewelry" = finished pieces. fields: List of column names to return (e.g., ["item_title", "vendor", "usd_price_decimal"]). If not specified, returns all columns. filters: List of filter conditions. Each filter is a dict with: - "field": column name - "op": operator — one of "eq", "neq", "gt", "gte", "lt", "lte", "like", "in", "not_in", "is_null", "is_not_null" - "value": the value to compare against Example: [{"field": "vendor", "op": "eq", "value": "Phillips"}, {"field": "usd_price_decimal", "op": "gte", "value": 50000}] sort_field: Column name to sort by (e.g., "usd_price_decimal" or "sale_date") sort_direction: "asc" or "desc" (default: "desc") limit: Maximum rows to return (default: 20, max: 500) offset: Number of rows to skip for pagination (default: 0)

Input Schema

NameRequiredDescriptionDefault
limitNo
tableYes
fieldsNo
offsetNo
filtersNo
sort_fieldNo
sort_directionNodesc

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.7

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, and an output schema exists, so the bar is lower. The description still adds value annotations cannot: the full operator vocabulary for filters, the 20-row default with a hard 500-row cap (the cap is absent from the schema), and the alias semantics for "gems" vs "jewelry". It does not mention error behavior for an invalid table or what happens when a filter references an unknown column.

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?

Front-loaded with purpose and a use case, then a clean Args block matching the schema order. Slightly long, and the two examples partially overlap (the query example restates filter/sort/limit intent), but nearly every sentence adds distinct information.

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?

With an output schema present, the description needn't explain return values, and annotations cover the safety profile. For a 7-parameter, 0%-coverage schema the description fully compensates, including nested filter structure and the limit ceiling, leaving nothing an agent needs to call it correctly.

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?

Schema coverage is 0%, so the description must carry the load and does: every parameter is explained, including the nested filter dict shape with its "field"/"op"/"value" keys, the enumerated operator list, and a concrete filter example. It also supplies the missing max limit and clarifies that `fields` defaults to all columns.

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?

States a specific verb and resource and immediately bounds the scope: 'Query one known table'. The worked example (table="watches" with filters, sort, limit) makes the operation concrete, and the described purpose is clearly distinct from the sibling `search` (whole-market) and `market_stats` (aggregates).

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?

Explicit routing is given: use this when the target table is already known from `list_tables`, use `search` when the table is unknown, and use `market_stats` for aggregate figures. Both an inclusion condition and two named alternatives are stated, so no inference is required.

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