Skip to main content
Glama

cribl_deployPipeline

Deploy a specific committed configuration version to a worker group. Returns the list of ConfigGroup objects from Cribl. Use to apply a saved configuration commit.

Instructions

Deploys a specific committed configuration version to a worker group. Returns the list of ConfigGroup objects Cribl provides.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
groupNameNoOptional: The name of the Worker Group/Fleet. If omitted, defaults to attempting to use Cribl Stream and if only one group exists for Stream, it will use that sole group.
versionYesThe commit ID (version) to deploy.

Implementation Reference

  • src/server.ts:475-501 (registration)
    Registers the 'cribl_deployPipeline' MCP tool with its schema and handler logic. Accepts optional groupName and required version, resolves the group, calls deployPipeline API, and returns the result.
    server.tool(
        'cribl_deployPipeline',
        'Deploys a specific committed configuration version to a worker group. Returns the list of ConfigGroup objects Cribl provides.',
        DeployPipelineArgsShape,
        async (args: ValidatedArgs<typeof DeployPipelineArgsShape>) => {
            console.error(`[Tool Call] cribl_deployPipeline with args:`, args)
            // Resolve group name (optional arg)
            const groupResolution = await resolveGroupName(args.groupName)
            if (groupResolution.error || !groupResolution.groupName) {
                return { isError: true, content: [{ type: 'text', text: groupResolution.error || 'Could not determine group name.' }] }
            }
            const groupName = groupResolution.groupName
            const { version } = args
    
            const result = await deployPipeline(groupName, version)
            if (!result.success || !result.data) {
                console.error(`[Tool Error] cribl_deployPipeline:`, result.error || 'Unknown error')
                return { isError: true, content: [{ type: 'text', text: `Error deploying version ${version}: ${result.error}` }] }
            }
    
            // Success: expose full JSON result including all ConfigGroup fields
            console.error(`[Tool Success] cribl_deployPipeline: Deployed commit ${version} to group ${groupName}. ConfigGroups returned: ${result.data.count}`)
            return {
                content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }]
            }
        }
    )
  • Zod schema for cribl_deployPipeline arguments: optional groupName (reusable schema) and required version string.
    const DeployPipelineArgsShape = {
        groupName: GroupNameArgSchema,
        version: z.string().min(1).describe('The commit ID (version) to deploy.')
    };
  • Core API handler that PATCHes /api/v1/master/groups/{groupName}/deploy with the given version (commit ID) and returns the DeployResponse containing ConfigGroup items.
    export async function deployPipeline(
        groupName: string,
        version: string // Commit ID to deploy
    ): Promise<ClientResult<DeployResponse>> {
        const context = `deployPipeline (Group: ${groupName}, Version: ${version})`;
        if (!groupName) return { success: false, error: 'Group name is required for deployPipeline.' };
        if (!version) return { success: false, error: 'Version (commit ID) is required for deployPipeline.' };
        
        const url = `/api/v1/master/groups/${groupName}/deploy`;
        console.error(`[stderr] Attempting API call: PATCH ${url} with version: "${version}"`);
        try {
            const payload = { version };
            // Use PATCH per API docs and expect DeployResponse
            const response = await apiClient.patch<DeployResponse>(url, payload);
            const data = response.data;
    
            if (data && Array.isArray(data.items) && data.items.length > 0) {
                console.error(`[stderr] ${context}: Deployment API returned ${data.items.length} ConfigGroup items (count=${data.count}).`);
                return { success: true, data };
            }
            const msg = 'Deployment API returned empty items array.';
            console.error(`[stderr] ${context}: ${msg}`);
            return { success: false, error: msg };
        } catch (error) {
            const errorMessage = handleApiError(error, context);
            return { success: false, error: errorMessage };
        }
    } 
  • Type definitions for the deploy API response: DeployResponse (count + items array) and ConfigGroup interface.
    interface ConfigGroup {
        id: string;
        name?: string;
        description?: string;
        configVersion?: string;
        workerCount?: number;
        isFleet?: boolean;
        isSearch?: boolean;
        deployingWorkerCount?: number;
        incompatibleWorkerCount?: number;
        tags?: string;
        streamtags?: string[];
        git?: {
            commit?: string;
            localChanges?: number;
            log?: any[];
        };
        // Allow extra fields from API we haven't modelled yet
        [key: string]: any;
    }
    
    interface DeployResponse {
        count: number;
        items: ConfigGroup[];
    }
  • Reusable Zod schema for the optional groupName argument, used by cribl_deployPipeline (and other tools).
    const GroupNameArgSchema = z.preprocess(
      (val) => (val === null ? undefined : val), // Map null to undefined before validation
      z.string().optional() // Then validate as optional string
    ).describe(
      "Optional: The name of the Worker Group/Fleet. If omitted, defaults to attempting to use Cribl Stream and if only one group exists for Stream, it will use that sole group."
    );
Behavior2/5

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

With no annotations, the description must disclose behavioral traits. It mentions return type but does not state whether deployment is destructive (overwrites existing), requires specific permissions, triggers restarts, or handles rollbacks. Lack of side-effect details limits agent understanding.

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?

Two sentences, no filler. Front-loaded with action and return type. Efficient for a simple tool.

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 tool with only 2 parameters and no output schema, the description covers the core action and return. Could mention error conditions (e.g., invalid version or group), but overall sufficient for the tool's simplicity.

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%, and the description adds no extra meaning beyond what's in the schema. The description restates 'committed version' and 'worker group' but doesn't clarify format, constraints, or defaults beyond schema. Adequate but not enhanced.

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?

Description clearly states verb ('Deploys'), resource ('committed configuration version to a worker group'), and return value ('list of ConfigGroup objects'). Distinct from siblings like cribl_commitPipeline (commits) and cribl_getPipelineConfig (retrieves).

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

Usage Guidelines2/5

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

No explicit guidance on when to use this tool versus alternatives like cribl_setPipelineConfig or cribl_restartWorkerGroup. Does not mention prerequisites (e.g., need a committed version) or conditions where deployment might fail.

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/pebbletek/cribl-mcp'

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