Skip to main content
Glama

experiment_plans_count_segment

Counts discovery companies matching the plan's search_params, stores the number as segment_size (with segment_counted_at) and recomputes the estimate, which adds a blocking segment_too_small problem when the segment cannot supply the companies the experiment needs. Free: no connects. Returns the updated plan; read estimate.feasible and estimate.problems. A plan with no criteria gets segment_size: null.

Method: POST /api/v1/workspaces/{workspace_sqid}/experiment-plans/{sqid}/count-segment/

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "sqid": "<sqid>"
    },
    "name": "experiment_plans_count_segment"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqidYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses mutations (segment_size, segment_counted_at, recomputed estimate), a possible blocking side effect (segment_too_small), cost (free/no connects), the return value (updated plan), and the no-criteria edge case (segment_size null).

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?

Front-loaded with the core action and outcome, and nearly every clause adds information (cost, return shape, edge case). It is a dense single paragraph, however, and the trailing raw endpoint line is reference detail rather than guidance.

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?

For a one-parameter mutation tool with no output schema and no annotations, the description supplies the return contract, the side effects, the failure mode, and the cost model. Nothing an agent needs in order to call and interpret it correctly appears to be missing.

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 coverage is 0% for the single sqid parameter, so the description would ideally explain it. It only implies the meaning through 'the plan's search_params' and the POST path template, where sqid is the plan identifier; it never states that sqid is the experiment plan's identifier.

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?

States a specific verb and resource: counts discovery companies matching the plan's search_params and writes the result as segment_size. It also distinguishes this from a pure estimate read by noting it recomputes and can add a blocking segment_too_small problem.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear context for when to call: it is free (no connects), it materializes segment_size, and it drives estimate.feasible/problems. It does not explicitly contrast with the sibling estimate tool (e.g., 'call estimate to preview without counting'), so alternatives are left implicit.

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.