Skip to main content
Glama

Define pipeline

define_pipeline

Create an additional pipeline (a named stage sequence) for opportunities or a custom object. Omit stages to seed from the workspace's default pipeline; or pass stages as [{key,label,role,is_closed?,is_won?,requires?,requires_mode?}] (role one of unqualified/qualifying/active/commit/won/lost; requires lists the field keys a deal must have filled to ENTER that stage). Optionally pass default_for_types — the opportunity type value keys this pipeline should be the default for, so new deals of a mapped type start on it (a type can map to only one pipeline). Returns the created pipeline.

When to use: When a motion needs its own stage sequence — e.g. an investor raise separate from the customer pipeline. Optionally set which deal types default onto it.

Example: Create an investor pipeline: Intro, Pitch, Diligence, Committed, Invested.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelYesDisplay name. Its slug (lowercase, underscores) becomes the stable pipeline_key, which must be unique in the workspace.
stagesNoOrdered stages [{key,label,role,is_closed?,is_won?,requires?,requires_mode?}], role unqualified/qualifying/active/commit/won/lost; omit or [] copies the default pipeline's stages.
applies_toNoThe object key this pipeline runs on (e.g. opportunity). Defaults to opportunity when omitted.
default_for_typesNoThe workspace's opportunity `type` VALUE KEYS this pipeline is the default for. New deals of a mapped type start on this pipeline. A type can map to only one pipeline (a double-claim is rejected); an unknown type key is rejected with the known keys. Registry data — not fixed type names.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pipelineNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare this a non-destructive, non-idempotent, closed-world write. The description adds real behavior beyond that: omitting stages seeds from the default pipeline, a type may map to only one pipeline (double-claims rejected), and it returns the created pipeline. It stops short of stating permissions, uniqueness failure handling, or reversibility.

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 verb, then a compact 'When to use' and an example. It is dense but well-organized; the only mild redundancy is re-enumerating the stage fields in prose that the schema already spells out.

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?

With an output schema present, the return-value mention is a bonus rather than a necessity. The description covers creation semantics, default seeding, and type-mapping constraints, leaving only permissions and failure modes unaddressed for a rich 4-parameter write tool.

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 100%, so every parameter (label, stages, applies_to, default_for_types) is already documented in the schema. The prose largely restates the stage object shape and role enum that the schema already provides, adding only marginal synthesis ('new deals of a mapped type start on it'). Baseline 3 is correct.

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+resource ('Create an additional pipeline (a named stage sequence)') and scopes it to 'opportunities or a custom object'. This is clearly distinguishable from sibling write tools like update_pipeline and archive_pipeline, which modify or remove rather than create.

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?

An explicit 'When to use' clause names the scenario (a motion needing its own stage sequence, e.g. an investor raise separate from the customer pipeline) and is reinforced by a concrete example. It does not, however, name update_pipeline/archive_pipeline as the alternatives for an existing pipeline, so the routing is clear but not exhaustive.

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