Skip to main content
Glama

Query Deals

query_deals
Read-only

Every result also carries the pipeline's stages (in order) and a pipeline_summary (open count and amount, closing this month, won/lost counts, win rate) for the whole pipeline — the summary ignores the filters. Dict with paging info, the stages, the pipeline summary, and the deals page. {total, has_more, stages: [{id, name, position}], pipeline_summary: {open_count, open_amount, closing_this_month {count, amount}, won_count, lost_count, win_rate}, deals: [{id, name, amount (decimal string or null), status, stage {id, name, position}, person_profile {id, name, title, email, linkedin_url, ...} or null, company_profile {id, name, domain} or null, assignee_email, expected_close_date, notes, created_at, stage_changed_at, closed_at (when it was won or lost; null while open), archived_at, open_task_count, next_task {id, title, due_at} or null, suggested_task, data}]}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qNoText match on the deal name, company name, or contact name.
limitNoMax deals (default 25, capped at 200).
stageNoOnly deals in this stage, by name (e.g. "Proposal") or id. Open deals sit in a stage; won/lost is the status, not a stage.
offsetNoDeals to skip for paging; re-call with offset += limit while has_more is true.
statusNo'open' (default), 'won', 'lost', or 'all'.open
person_idNoOnly deals linked to this person (a query_people `id`).
company_idNoOnly deals linked to this company (a query_companies `id`).
assignee_emailNoOnly deals owned by this teammate (an active teammate from list_teammates).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior4/5

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

Annotations include readOnlyHint: true, so the tool is already marked as read-only. The description adds valuable context about the shared nature of deals, the inclusion of stages and pipeline summary in every result, and that the summary ignores filters. It also details the return fields in the <returns> section, including complex nested structures. This goes beyond the annotation by clarifying data scope and returned metadata.

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 well-structured with a summary and detailed returns section. It is front-loaded with the main purpose and example use cases, then details the return format. Every sentence adds value, and the use of bullet-style examples is efficient without being verbose.

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 parameter count (8), the rich schema descriptions, and the absence of an output schema, the description compensates by providing a detailed <returns> section that explains the output structure. It also clarifies edge cases like closed_at null while open and pipeline_summary ignoring filters. The tool is complex, yet the description covers all necessary aspects for correct invocation and result interpretation.

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 schema already describes each parameter clearly. The description does not add additional semantics beyond what's in the schema, as it focuses on the overall behavior and return structure. However, it helps contextualize parameters like status and stage by explaining their relationship (e.g., 'won/lost is the status, not a stage'). This adds slight value, but is not enough to warrant a 4.

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 lists deals in the user's CRM pipeline, newest first, with specific example queries. It also highlights that deals are shared across the team and includes the pipeline summary. This distinguishes it from related tools like query_people, query_companies, and update_deal.

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?

Provides explicit use cases such as 'what's in my pipeline', 'does Jane have a deal', 'what did we win this month', and 'to find a deal's id before update_deal.' It also explains that the summary ignores filters, which helps avoid misinterpretation. No exclusion of alternatives is needed as it is clear when this tool is appropriate.

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.

Resources