Skip to main content
Glama
soil-dev

capsulemcp

by soil-dev

filter_opportunities

Read-only

Filter opportunities by structured conditions—milestone, value, close date, tags—to find deals like last won or closed this month.

Instructions

Filter opportunities by structured conditions (milestone, value, close date, tags). Use this — not search_opportunities — for questions like 'last won deal', 'opportunities closed this month', 'pipeline X at milestone Y'. Capsule's API does not support ad-hoc sort, but for 'most recent X' you can filter by a date field (e.g. {field: 'closedOn', operator: 'is within last', value: 90}) and pick the highest-id row — Capsule IDs are monotonic, so newest id = newest record.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNo
embedNoComma-separated embeds. Valid tokens: tags, fields, party, milestone, missingImportantFields.
perPageNo
conditionsYesArray of filter conditions. All conditions are ANDed together. To get newest records, use a date condition like {field: 'addedOn', operator: 'is within last', value: 7} and pick the highest-id row from the result (Capsule IDs are monotonic).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.3.0
    • removedInput schema / properties / conditions / items / properties / value / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "boolean"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / conditions / items / properties / value / type
      Added value: +[
      +  "string",
      +  "number",
      +  "boolean",
      +  "null"
      +]
  2. Changed1 schema field changedv2.2.0
    • changedInput schema / properties / embed / description
      Previous value: -"Comma-separated embeds. Valid tokens: tags, fields, missingImportantFields."New value: +"Comma-separated embeds. Valid tokens: tags, fields, party, milestone, missingImportantFields."
  3. Changed1 schema field changedv2.1.2
    • changedInput schema / properties / embed / description
      Previous value: -"Comma-separated embeds, e.g. 'tags,fields'"New value: +"Comma-separated embeds. Valid tokens: tags, fields, missingImportantFields."
  4. Addedv1.7.0
  5. Removedv1.6.2
  6. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so safety is covered. The description adds genuinely useful behavior beyond annotations: Capsule's API does not support ad-hoc sort, IDs are monotonic, and 'most recent X' can be approximated by filtering on a date field and taking the highest ID. This is non-obvious and valuable context.

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 two sentences with no wasted words. The purpose is front-loaded, and the second sentence packs a high-value sorting workaround with a concrete example. Every clause earns its place.

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?

For a read-only filter tool with a well-documented schema and no output schema, the description covers the key non-obvious pitfalls: no sort support and how to get newest records. It doesn't describe the return shape or restate AND semantics, but those are either obvious for a filter or already in the schema. Overall, it is complete enough 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 50%: conditions and embed are thoroughly documented, while page and perPage are left to their self-explanatory names. The description adds a concrete condition example and summarizes possible condition fields, but the schema already carries most of the semantic weight for conditions. It doesn't compensate for the undocumented pagination params, though those are conventional.

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 opens with a specific verb and resource: 'Filter opportunities by structured conditions (milestone, value, close date, tags).' It clearly enumerates the condition dimensions and explicitly contrasts with search_opportunities, so an agent can tell them apart without inspecting schemas.

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?

It explicitly says 'Use this — not search_opportunities —' and gives concrete example questions ('last won deal', 'opportunities closed this month', 'pipeline X at milestone Y'). It even provides a workaround for the API's lack of ad-hoc sorting, so the agent knows exactly when and how to use this tool.

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

Deploy Server

Other Tools