Skip to main content
Glama

Query sales

query_sales
Read-onlyIdempotent

Queries sales metrics from the database: 'ventas_periodo', 'margen', 'ranking_productos', 'por_empleado', or 'historial_cliente'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoEnd date YYYY-MM-DD. Requires 'from'.
fromNoStart date YYYY-MM-DD. Requires 'to'.
limitNoMax results (default 10, max 50).
presetNoPreset date range. Mutually exclusive with from/to.
metricaYesMetric to query.
customer_nameNoCustomer name or fragment. Only for historial_cliente.

TDQS

A3.6/5.0
Behavior2/5

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

The description adds no behavioral context beyond what annotations already provide. Annotations already declare readOnlyHint=true and destructiveHint=false, and the description merely restates that it 'queries' data. It does not disclose anything about output shape, pagination, or prerequisites, unlike the get_calls example which added scoping constraints.

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 a single sentence that efficiently states the purpose and lists the supported metric identifiers. There is no redundancy or filler; every word contributes to the understanding of the tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description should explain what the tool returns. It does not describe the return value structure or what each metric provides (e.g., time-series vs ranking). This is a significant gap for a query tool with multiple metric modes, leaving the agent to guess about outputs.

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 100%, so the baseline is 3. The description's list of metric names duplicates the enum in the 'metrica' parameter, adding no new meaning. Other parameters are fully described in the schema, so the description provides no additional value here.

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 verb 'Queries' and the resource 'sales metrics from the database', and enumerates the specific metric identifiers (e.g., 'ventas_periodo', 'margen'). This distinguishes it from sibling tools like query_catalog, which would handle catalog queries.

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 provides clear context that this tool is for sales metrics, which implies when to use it. However, it does not explicitly mention alternative tools or exclusion scenarios, though the list of metrics helps clarify scope. Since the context is clear, this is slightly above implied usage.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

B3.1/5.0
Disambiguation2/5

Multiple tools have overlapping purposes, such as caja_registrar_movimiento vs register_movement, get_payment_intent_status vs open_cobro_status, and adjust_stock vs stock_load. The distinctions are not immediately clear from names/descriptions, causing a high risk of misselection.

Naming Consistency2/5

Naming is inconsistent: mixes English and Spanish (caja_*, emit_invoice, send_whatsapp_*), and uses different patterns (open_*, get_*, query_*, list_*, etc.). Some names like stock_load and bulk_price_update don't follow a clear verb_noun convention.

Tool Count2/5

50 tools is excessive for most contexts, even for a broad ERP-like domain. Many are UI widgets (open_*) that add clutter and could be consolidated, making the tool set feel heavy and harder to navigate.

Completeness3/5

The tool set covers many core business functions (products, suppliers, customers, sales, invoicing, shipping, cash register, payments, integrations). However, there are noticeable gaps: purchase requests have only create (no list/update/delete), shipments cannot be updated/cancelled, and sales lack direct update/query by ID.