Skip to main content
Glama
mrchris2000

MCP DevOps Plan Server

by mrchris2000

get_available_components

Retrieve available components for a specific application and project in DevOps Plan to manage work items and project structure.

Instructions

Get the list of components for a project in Plan for a given application

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
applicationYesName of the application
projectIdYesID of the project

Implementation Reference

  • Implementation of the 'get_available_components' tool handler.
    server.tool(
        "get_available_components",
        "Get the list of components for a project in Plan for a given application",
        {
            application: z.string().describe("Name of the application"),
            projectId: z.string().describe("ID of the project")
        },
        async ({ application, projectId }) => {
            try {
                if (!globalCookies) {
                    globalCookies = await getCookiesFromServer(serverURL);
                    if (!globalCookies) {
                        console.error("Failed to retrieve cookies from server.");
                        return { error: "Failed to retrieve cookies." };
                    }
                    console.log("Received Cookies:", globalCookies);
                } else {
                    console.log("Reusing Stored Cookies:", globalCookies);
                }
    
                const queryPayload = {
                    queryDef: {
                        primaryEntityDefName: "Component",
                        queryFieldDefs: [
                            { fieldPathName: "Name", isShown: true, sortOrder: 0 },
                            { fieldPathName: "dbid", isShown: true, sortOrder: 0 },
                            { fieldPathName: "record_type", isShown: true, sortOrder: 0 }
                        ],
                        filterNode: {
                            boolOp: "BOOL_OP_AND",
                            fieldFilters: [],
                            childFilterNodes: []
                        }
                    },
                    resultSetOptions: {
                        convertToLocalTime: false,
                        maxResultSetRows: 10000,
                        pageSize: 10000
                    }
                };
    
                const queryResponse = await fetch(`${serverURL}/ccmweb/rest/repos/${teamspaceID}/databases/${application}/query`, {
                    method: 'POST',
                    headers: {
                        'Content-Type': 'application/json',
                        'Authorization': `Basic ${personal_access_token_string}`,
                        'Cookie': globalCookies
                    },
                    body: JSON.stringify(queryPayload)
                });
    
                const queryData = await queryResponse.json();
                const resultSetId = queryData.result_set_id;
    
                if (!resultSetId) {
                    throw new Error("Failed to retrieve result set ID");
                }
    
                const componentsResponse = await fetch(`${serverURL}/ccmweb/rest/repos/${teamspaceID}/databases/${application}/query/${resultSetId}`, {
                    method: 'GET',
                    headers: {
                        'Content-Type': 'application/json',
                        'Authorization': `Basic ${personal_access_token_string}`,
                        'Cookie': globalCookies
                    }
                });
    
                const componentsData = await componentsResponse.json();
                
                if (componentsData && componentsData.rows) {
                    const componentNames = componentsData.rows.map(row => row.displayName);
                    return {
                        content: [{ type: 'text', text: `Components retrieved: ${JSON.stringify(componentNames)}` }]
                    };
                } else if( componentsData.length === 0) {
                    return {
                        content: [{ type: 'text', text: `Components retrieved: ${JSON.stringify("[]")}` }]
                    };
                }
            } catch (e) {
                return {
                    content: [{ type: 'text', text: `Components retrieved: ${JSON.stringify("[]")}` }]
                };
            }
        }
    )
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'Get' implies a read-only operation, the description does not confirm safety, idempotency, error conditions (e.g., invalid projectId), or pagination behavior.

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?

Single sentence, front-loaded, and efficiently structured without redundant words. However, extreme brevity comes at the cost of omitting necessary behavioral and domain context.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no output schema and no annotations, the description is insufficient. It fails to define what 'components' represent in this domain (feature areas? modules?) or how they relate to work items, despite the presence of sibling work-item tools.

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?

With 100% schema description coverage, the baseline is met. The description implies a hierarchical relationship ('project in Plan for given application') but does not add critical details like ID format, case sensitivity, or whether application names are human-readable or system identifiers.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Get') and resource ('list of components'), but 'components' lacks domain definition and the description fails to distinguish this from sibling tools like get_available_projects or get_available_states. The phrase 'in Plan' assumes product knowledge without clarification.

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 (e.g., get_work_items), no prerequisites mentioned, and no exclusions provided. The agent must infer usage solely from the parameter requirements.

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/mrchris2000/mcp-devops-plan'

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