Skip to main content
Glama
mrchris2000

MCP DevOps Plan Server

by mrchris2000

get_available_states

Retrieve available state transitions for work items in a DevOps Plan application to understand permissible workflow actions.

Instructions

Gets the state transition matrix for work items in Plan for a given application, showing available transitions/actions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
applicationYesName of the application

Implementation Reference

  • The registration and handler implementation of the "get_available_states" tool, which queries available states for work items via a REST API.
    // Tool to get available states for work items
    server.tool(
        "get_available_states",
        "Gets the available states for work items in Plan for a given application",
        {
            application: z.string().describe("Name of the application")
        },
        async ({ application }) => {
            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 response = await fetch(`${serverURL}/ccmweb/rest/repos/${teamspaceID}/databases/${application}/workspace/queryDefs/WorkItem/fieldOptions/state`, {
                    method: 'GET',
                    headers: {
                        'Content-Type': 'application/json',
                        'Authorization': `Basic ${personal_access_token_string}`,
                        'Cookie': globalCookies
                    }
                });
    
                if (!response.ok) {
                    const errorText = await response.text();
                    throw new Error(`Failed to get available states with status ${response.status}: ${errorText}`);
                }
    
                const data = await response.json();
                
                return {
                    content: [{ type: 'text', text: `Available states: ${JSON.stringify(data)}` }]
                };
            } catch (e) {
                return {
                    content: [{ type: 'text', text: `Error retrieving available states: ${e.message}` }]
                };
            }
        }
    );
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains what content is returned (transitions/actions matrix) but does not confirm this is read-only, safe, or idempotent, nor does it mention performance characteristics or caching. Adequate but missing safety confirmation.

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?

Single sentence with no waste. Information is front-loaded with the action ('Gets') and key resource ('state transition matrix') immediately stated. Every clause earns its place by clarifying scope or output content.

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

Completeness3/5

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

Given the single parameter and lack of output schema, the description adequately explains the conceptual return value (matrix of transitions). However, given the absence of annotations, it should ideally confirm the read-only nature of the operation to be complete. Sufficient for a simple lookup tool but has gaps.

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 100%, establishing a baseline of 3. The description adds domain context ('Plan', 'work items') that helps situate the 'application' parameter, but does not add syntax details, examples, or constraints beyond what the schema already provides.

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

Purpose4/5

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

The description clearly identifies the resource (state transition matrix for work items) and scope (in Plan for a given application). It distinguishes from sibling 'change_work_item_state' by specifying this retrieves/ shows available transitions rather than performing them. The verb 'Gets' is slightly weak but functional.

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

Usage Guidelines3/5

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

The description implies this tool is for discovering valid state transitions, suggesting use before changing states, but does not explicitly state when to use it relative to 'change_work_item_state' or provide explicit prerequisites. Usage guidance is present but implied rather than prescriptive.

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