Skip to main content
Glama
soil-dev

capsulemcp

filter_opportunities

Filter opportunities by conditions like milestone, value, close date, or tags. Use date filters with monotonic IDs to retrieve newest records.

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
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).
embedNoComma-separated embeds, e.g. 'tags,fields'
pageNo
perPageNo
Behavior4/5

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

With no annotations, the description carries full behavioral disclosure burden. It reveals that Capsule's API does not support ad-hoc sort but offers a workaround using date filters and monotonic IDs. Also explains field naming discrepancies between filter and response schemas. Lacks explicit statement about read-only nature, but safe to infer.

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 a single, dense paragraph covering purpose, usage, and behavioral details. While comprehensive, it could be slightly more structured (e.g., breaking into sentences) for easier scanning. However, it is front-loaded and each sentence adds value.

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 tool's 4 parameters, no output schema, and presence of sibling filtering tools, the description is complete. It addresses filtering mechanics, sorting limitations, field mappings, and even links to external API documentation for more details.

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?

The description adds significant meaning beyond the schema, such as listing common field names, operator semantics, how to handle null values, and the monotonic ID trick. For a schema with 50% description coverage, this fully compensates and provides practical usage details.

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 purpose: 'Filter opportunities by structured conditions (milestone, value, close date, tags).' It also distinguishes from the sibling tool search_opportunities by specifying use cases like 'last won deal' or 'opportunities closed this month'.

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?

Explicitly instructs when to use this tool over search_opportunities, providing example queries. It also includes guidance on handling sorting limitations with Capsule's monotonic IDs, showing a thorough understanding of usage context.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/soil-dev/capsulemcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server