Skip to main content
Glama
soil-dev

capsulemcp

by soil-dev

batch_update_opportunity

Update 1-50 opportunities in parallel. Use for mass stage transitions, owner reassignments, or value adjustments. Review per-item results to handle partial failures.

Instructions

Update 1–50 opportunities in parallel. Same input shape as update_opportunity but wrapped in an items array. Use this — not N sequential update_opportunity calls — for mass stage transitions (e.g. move a milestone batch to Won), owner reassignments, or value adjustments. Connector fans out parallel HTTP requests, default cap 5 (CAPSULE_MCP_BATCH_CONCURRENCY). Returns { results: [{ok, ...} per item], summary: {total, succeeded, failed} }. Partial failures possible; Capsule has no rollback.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYesArray of 1–50 update_opportunity inputs. Each item is the same shape as a single update_opportunity call — id is required, every other field is optional. Capped at 50 so a single tool call can't burn an outsized share of Capsule's hourly per-token rate budget.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed2 schema fields changedv2.2.0
    • addedInput schema / properties / items / items / properties / duration
      Added value: +{
      +  "anyOf": [
      +    {
      +      "exclusiveMinimum": 0,
      +      "maximum": 9007199254740991,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedInput schema / properties / items / items / properties / durationBasis
      Added value: +{
      +  "enum": [
      +    "FIXED",
      +    "HOUR",
      +    "DAY",
      +    "WEEK",
      +    "MONTH",
      +    "QUARTER",
      +    "YEAR"
      +  ],
      +  "type": "string"
      +}
  2. Changed10 schema fields changedv2.1.2
    • removedInput schema / properties / items / items / properties / fields / description
      Removed value: -"Set custom field values on this record. PARTIAL UPDATE: only the definitions you list are touched; any field NOT in this array is left unchanged. Discover available definitions via list_custom_fields; read current values via get_opportunity with embed='fields'."
    • removedInput schema / properties / items / items / properties / fields / items / properties / definitionId / description
      Removed value: -"The custom-field definition id from list_custom_fields. Identifies which field on the entity to set."
    • removedInput schema / properties / items / items / properties / fields / items / properties / value / description
      Removed value: -"The new value. String for TEXT / DATE / LIST / LARGE_TEXT / LINK fields, number for NUMBER fields, boolean for BOOLEAN fields. Clearing: pass null for TEXT / NUMBER / DATE / LIST (Capsule removes the row). BOOLEAN does NOT accept null (Capsule returns 422 'invalid type for field'); use `value: false` instead. Note BOOLEAN fields are observably **two-state**: a row exists with `value: true`, or no row exists. Setting `value: false` removes the row entirely — readers should treat absent BOOLEAN rows as equivalent to false. Tri-state BOOLEAN semantics (true / false / unknown) are not achievable through Capsule's API. Audit-log noise: sending value=null on a field that's already empty/cleared is accepted by Capsule but still bumps the parent entity's `updatedAt`. Read the current value via embed='fields' first if `updatedAt` is being used as a 'last meaningful change' signal. NUMBER quirks: Capsule stores numerics correctly but the read-back via embed=fields returns them as STRINGS (e.g. value=3 reads as '3'); callers comparing values must coerce. TEXT quirks: value='' has the same observable effect as value=null (row removed); empty-string and never-set are indistinguishable."
    • removedInput schema / properties / items / items / properties / lostReasonId / description
      Removed value: -"Reason the opportunity was lost. Only meaningful when transitioning to a Lost milestone — Capsule silently drops it for other milestones. Without this set, a connector-driven Lost-close leaves `lostReason: null`. Discover IDs via list_lostreasons."
    • removedInput schema / properties / items / items / properties / milestoneId / description
      Removed value: -"Move the opportunity to this milestone. Side effects depend on the target: closing milestones (Won/Lost) auto-set `closedOn` to today and `probability` to the milestone default (100/0), preserving `lastOpenMilestone` as the previous open stage; moving back to an open milestone clears `closedOn` and re-applies the milestone's default probability (Won/Lost is reversible — no separate reopen tool). WARNING: Capsule does NOT validate that the new milestone belongs to the opportunity's current pipeline. Passing a milestoneId from a different pipeline silently relocates the opportunity across pipelines, and `lastOpenMilestone` may then reference a milestone in the previous pipeline. Verify against the opportunity's current pipeline (read the opp first, list its pipeline's milestones via list_milestones) before passing a cross-pipeline id. NOTE: changing `milestoneId` can fire **pipeline / milestone-reached automations** that mutate `owner` / `team` on the destination milestone (same shape as `create_opportunity` — see its `milestoneId` description for the owner-clearing automation caveat). If a milestone-change-and-owner-set in the same call lands with `owner: null`, follow up with a second `update_opportunity` (or `batch_update_opportunity`) carrying both `ownerId` and `teamId` — milestone-reached triggers only fire on the transition, so a subsequent PUT preserves your values."
    • removedInput schema / properties / items / items / properties / ownerId / description
      Removed value: -"Reassign owner: pass a user ID to set, or `null` to unassign (verified empirically in v1.6.5 wire-trace — Capsule accepts `owner: null` on PUT /opportunities/:id, mirroring the v1.6.4 finding on /parties; brings update_opportunity into parity with update_party and update_project). When you supply `ownerId` and omit `teamId`, the connector fetches the opportunity's current team and includes it in the PUT body to preserve it across the owner change. Without this defensive read, Capsule's PUT would clear the existing team (see NOTES-ON-CAPSULE-API.md §27 — same asymmetric semantic as /kases). Supply `teamId` explicitly on the same call to change the team instead. Combine `ownerId: null` + `teamId: <T>` in one call to transfer an opportunity to team-ownership with no specific user (verified empirically in v1.6.5; the owner-clears-team semantic doesn't fire when owner is being cleared to null)."
    • removedInput schema / properties / items / items / properties / partyId / description
      Removed value: -"Reassign the opportunity to a different primary party. Capsule requires every opportunity to have a party — passing `null` is rejected with 422 'party is required' (use Capsule's web UI if you need to dissolve the link entirely). Discover ids via search_parties / filter_parties. No defensive read-modify-write needed: this connector verified empirically (v1.6.3 wire-trace) that `party` is a standalone PUT field on /opportunities and does not interact with the asymmetric owner/team semantic from NOTES-ON-CAPSULE-API.md §27. NOTE: parent-ref nullability differs by entity — `update_task.partyId` IS nullable (orphan task), but opportunities and projects must always have a parent party. The same applies to `update_project.partyId`."
    • removedInput schema / properties / items / items / properties / probability / description
      Removed value: -"Win probability 0–100. On an open milestone this overrides the milestone's default probability. CANNOT be set in the same call as a closing milestone (Won/Lost) — Capsule processes the milestone change first, the opportunity becomes closed, then the probability update is rejected as edit-on-closed-opp with 422 'probability can be updated only for open opportunity'. To close an opportunity, leave probability out of the call: it auto-snaps to 100% (Won) or 0% (Lost)."
    • removedInput schema / properties / items / items / properties / teamId / description
      Removed value: -"Reassign team: pass a team ID (discover via list_teams) to set, or `null` to unassign. Capsule preserves the existing owner across a team change (server-side), so `update_opportunity { teamId }` alone is safe — the owner is carried through. Owner must be a member of the new team or Capsule returns 422 'owner is not a member of the team'. Independent from `ownerId` — setting `teamId` does NOT clear the owner."
    • removedInput schema / properties / items / items / properties / value / properties / currency / description
      Removed value: -"ISO 4217 currency code (3 letters), e.g. 'GBP', 'USD', 'EUR'. Required when amount is set."
  3. Addedv1.7.0
  4. Removedv1.6.2
  5. Addedv1.6.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=false and destructiveHint=false, leaving the description to carry the behavioral burden — and it delivers. It discloses concurrency behavior with a configurable cap ('default cap 5 (CAPSULE_MCP_BATCH_CONCURRENCY)'), the exact return shape, and critically the failure semantics: 'Partial failures possible; Capsule has no rollback.' For a batch mutation, this is precisely the risk information an agent needs.

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?

Five sentences, zero fluff, and the core action is front-loaded. Each subsequent sentence adds a distinct piece: shape relation, use case, concurrency behavior, return contract, failure mode. It earns a 4 rather than a 5 because the single dense paragraph could be slightly more scannable — the concurrency and failure-semantics details could be visually separated — though nothing approachable is wasted.

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?

Given there is no output schema, the description correctly documents the return contract ({ results: [...], summary: {...} }), the input-shape relationship to the single-update sibling, the 1-50 cardinality, and idempotency-adjacent safety info (no rollback). This is complete for a batch utility whose error contract matches its single sibling. Minor deduction: the contents of the per-item `ok` object are left undefined, and there's no note about whether a single malformed item aborts the batch or gets reported inline.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the items parameter already carries a rich description explaining the 1-50 bound and the rationale ('so a single tool call can't burn an outsized share of Capsule's hourly per-token rate budget'). The main description complements this by documenting the return shape. Slight deduction because the 'same shape as update_opportunity' reference assumes the agent cross-references another tool's schema, and field-level semantics are delegated entirely.

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?

Opens with 'Update 1–50 opportunities in parallel' — a specific verb, resource, and scope qualifier in one breath. It then names the sibling it is not ('Same input shape as update_opportunity but wrapped in an items array'), making the single-vs-batch distinction unmistakable against siblings like update_opportunity, batch_update_party, and batch_update_project.

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?

'Use this — not N sequential update_opportunity calls — for mass stage transitions (e.g. move a milestone batch to Won), owner reassignments, or value adjustments' is an explicit when-to-use directive that names the alternative and gives concrete example scenarios. This is the gold standard the rubric calls for.

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