Skip to main content
Glama
stevyf93II

catalog-mcp

by stevyf93II

Top N records by a numeric field

catalog_top
Read-onlyIdempotent

Rank records by a numeric field with optional filters, returning sorted results in ascending or descending order.

Instructions

Rank records by a numeric field with an optional filter. Example: sort_by "price", sort_dir "asc", filter {"has":{"features":["Bunkhouse"]}} = cheapest records with that feature.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
fieldsNo
filterNoFilter spec. Keys: eq (equality: {"type":"tent","heated":true}), min / max (numeric bounds: {"price":100}; records without a number in a bounded field are excluded), has (array membership, all required: {"tags":["a","b"]}), contains (case-insensitive substring: {"name":"alpine"}; use field "*" to search all string fields).
sort_byYes
sort_dirNodesc

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly, non-destructive, idempotent behavior, so the description need not repeat safety. It adds useful ranking/filter semantics and a concrete example, though it does not explain edge cases like records missing the sort_by field.

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?

Two sentences, with the core action first and a concrete example second. No filler or redundancy.

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 tool is simple enough and the schema covers filter syntax, limit bounds, and sort direction defaults. But there is no output schema and the description does not state the return shape (full records vs. projected fields), which is a notable gap for correct invocation.

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 only 20%, so the description should compensate; the example meaningfully maps sort_by, sort_dir, and filter together. However, it does not clarify the fields parameter or how limit interacts with ranking, leaving a partial gap.

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 it ranks records by a numeric field with optional filtering, and the worked example (sort_by price, sort_dir asc, filter has features) demonstrates a concrete use. This distinguishes it from siblings like catalog_get, catalog_count_by, and catalog_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?

The description implies when to use it: when you need ordered/top-N records over a numeric field, optionally narrowed by a filter. The example gives a concrete scenario, but it does not explicitly name alternatives or state when not to use it.

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