Skip to main content
Glama

Octolane

search_deals

Read-only

Search deals/opportunities in the CRM. USE FOR: pipeline queries, deal lookups by name or account or contact, deals closing soon, deals over a certain amount. PAGINATION: results are one page, not the complete match set. Use limit up to 50 and start with offset: 0; while the number of records read is less than total_count, call this tool again with offset increased by the number of results returned. Ordering is stable across pages. PARAMETER CHOICE: use the top-level semantic params (pipeline_name, stage_name, account_name, contact_name, min_amount, max_amount, close_date_from, close_date_to) for common filters. Use additional_filters only for custom attributes, owner, last activity, or anything beyond the semantic params. ADDITIONAL_FILTERS PREREQUISITES: (1) set pipeline_name or stage_name first to resolve a pipeline (additional_filters and sort_by both require this); (2) for custom attributes, call get_deal_fields first to get the correct property_name. Do NOT guess property names. OWNER LOOKUP: call list_workspace_members to resolve the person's user_id; a CRM contact email is not a workspace owner ID. Filter with additional_filters [{property_name: 'opportunity_owner', condition: 'is', value: user_id}]. For all pipelines, repeat the scoped search for each pipeline and paginate each result. Do not filter ownership by owner_email. MULTIPLE DEAL NAMES IN ONE QUERY: use keywords, not search_query. See the keywords parameter docs for the batching rule. ZERO RESULTS RETRY: if the search returns total_count=0, retry ONCE with a broader keyword before telling the user nothing was found. Drop trailing segments ("Acme Q4 Expansion Deal" → "Acme Q4 Expansion" → "Acme"), or swap to a different name field (account_name only or contact_name only). Stop after one retry - do not loop.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "search_deals"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum results per page (1-50, default 10).
offsetNo0-indexed row offset for paging. Start at 0, then increase by the number of results returned until `offset + results.length >= total_count`. Ordering is stable across pages, so tied sort values do not repeat or skip records.
sort_byNoSort order. Defaults to `updated_at desc` when omitted. Requires a resolved pipeline. Set `pipeline_name` or `stage_name` first.
keywordsNoMulti-keyword OR search. Pass up to 10 deal name terms; any deal matching at least one term is returned. **Always prefer this over multiple search_deals calls when the user references more than one deal.** Example: "How are the Acme renewal, Globex POC, and Initech expansion looking?" becomes one call with `keywords: ["Acme renewal", "Globex POC", "Initech expansion"]`, not three calls. Use `search_query` instead for a single deal with fuzzy/partial matching.
max_amountNoMaximum deal value.
min_amountNoMinimum deal value.
session_idNoThe ID of the task this call belongs to. Leave it out on your first call. On every later call for the same task, send the ID an earlier result gave you, and pass it to any subagent working on that task.
stage_nameNoFilter by stage name (e.g. 'Negotiation', 'Won').
account_nameNoFilter by associated company/account name. Use when the user explicitly asks to filter by company, or to check whether a company already has a deal. Do NOT use for deal name lookups (use `search_query` or `keywords` instead).
contact_nameNoFilter by associated contact name.
search_queryNoSearch by deal/opportunity name with fuzzy matching. Use when the user mentions a single deal by name (e.g. 'the Linear deal', 'Acme contract'). For multiple deals in one query, use `keywords` instead.
close_date_toNoLast day of the close date range, INCLUSIVE, as a calendar date `YYYY-MM-DD` in the user's calendar (e.g. '2026-05-19'). If you pass an instant, its written date is used, whatever the offset.
pipeline_nameNoFilter by pipeline name (e.g. 'Customer Success', 'Sales').
close_date_fromNoFirst day of the close date range, INCLUSIVE, as a calendar date `YYYY-MM-DD` in the user's calendar (e.g. '2026-05-18'). If you pass an instant, its written date is used, whatever the offset.
additional_filtersNoEscape hatch for filters not covered by the top-level semantic params (custom attributes, owner, last activity, etc.). Requires a resolved pipeline. Set `pipeline_name` or `stage_name` first; cross-pipeline rich filtering is not yet supported. `before`, `on_or_after`, `is` and `is_not` compare dates by CALENDAR DAY, and `after` compares against the START of the given day, so on a timestamp field it still includes most of that day; use `on_or_after` the next day to exclude it, so pass calendar dates as `YYYY-MM-DD` from the user's own calendar, not instants: an instant with a timezone offset is cut to its UTC day, which east of UTC is the day before. For a date range, pass TWO filters on the same property, `before` being exclusive. Example for one day: `{property_name:opportunity_close_date, condition:on_or_after, value:'2026-05-18'}` AND `{property_name:opportunity_close_date, condition:before, value:'2026-05-19'}`. There is no `between` operator. Use those conditions for dates, not `greater_than` / `less_than`, which compare exact timestamps (a bare date there means 00:00 UTC). Records with no date never match a date bound. Whether `is_not` includes them depends on the search path, so never report undated records as included or excluded by it; list them with `empty` in a separate search when they matter. RELATIVE DATES: for 'today', 'this week', 'in the next 30 days' and the like, prefer one filter with a relative condition (`today`, `yesterday`, `tomorrow`, `before_today`, `after_today`, `this_week`, `next_week`, `this_month`, or `next_x_days` / `past_x_days` with the day count as `value`). These are resolved from the user's own calendar date, weeks starting Monday, so you do not compute dates or offsets yourself. On timestamp fields (`updated_at`, `opportunity_creation_date` and the interaction fields) each day is compared as the UTC day of that date, so it is offset from the user's local day by their UTC offset; say so when a result depends on the hours near midnight.

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already establish a read-only, non-destructive, closed-world operation, but the description adds substantial behavioral context: pagination mechanics, stable ordering, resolved-pipeline prerequisites for additional_filters and sort_by, cross-pipeline limitations, zero-results retry policy, and date-filter edge cases. These are operational behaviors an agent needs and are not supplied by the annotations.

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 long, but it is front-loaded and organized with clear uppercase headers such as USE FOR, PAGINATION, PARAMETER CHOICE, and ZERO RESULTS RETRY. Most content earns its place given the tool's complexity, though some pagination and date semantics repeat details already present in the schema.

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

Completeness4/5

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

The definition is highly complete on invocation strategy, prerequisites, filtering, pagination, and retry behavior. Since there is no output schema, the main remaining gap is that it does not describe the returned record fields or the full response shape beyond results and total_count, which would help an agent interpret results without trial and error.

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 100%, so the baseline is 3, but the description adds meaningful decision guidance beyond schema text: top-level semantic params are preferred for common filters, additional_filters is an escape hatch for custom attributes/owner/activity, property_name must come from get_deal_fields, and owner filtering must use a workspace user_id rather than an email. It also clarifies the keywords batching rule for multiple deal names.

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 first sentence states a specific verb and resource: 'Search deals/opportunities in the CRM.' The USE FOR block enumerates concrete query types, and the description distinguishes search_query from keywords and account_name from deal-name lookup. An agent can identify the tool's purpose without opening the schema.

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?

The description explicitly says when to use semantic params versus additional_filters, when to call get_deal_fields, when to call list_workspace_members, how to handle multiple deal names, and how to retry on zero results. It also states the one-retry limit and cross-pipeline workaround, leaving little to inference.

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