Skip to main content
Glama
mrchris2000

MCP DevOps Plan Server

by mrchris2000

get_available_projects

Retrieve available projects for a specified application in DevOps Plan systems to facilitate work item management and project organization.

Instructions

Get the list of projects in Plan for a given application

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
applicationYesName of the plan application

Implementation Reference

  • The implementation of the get_available_projects tool, which queries a Plan database for projects based on the provided application name.
    server.tool(
        "get_available_projects",
        "Get the list of projects in Plan for a given application",
        {
            application: z.string().describe("Name of the plan 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 queryPayload = {
                    queryDef: {
                        primaryEntityDefName: "Project",
                        queryFieldDefs: [
                            { fieldPathName: "dbid", isShown: true, sortType: "SORT_DESC" },
                            { fieldPathName: "Name", isShown: true },
                            { fieldPathName: "DescriptionPT", isShown: true }
                        ],
                        filterNode: {
                            boolOp: "BOOL_OP_AND",
                            fieldFilters: [],
                            childFilterNodes: []
                        }
                    },
                    resultSetOptions: {}
                };
    
                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 projectsResponse = await fetch(`${serverURL}/ccmweb/rest/repos/${teamspaceID}/databases/${application}/query/${resultSetId}?pageNumber=1`, {
                    method: 'GET',
                    headers: {
                        'Content-Type': 'application/json',
                        'Authorization': `Basic ${personal_access_token_string}`,
                        'Cookie': globalCookies
                    }
                });
    
                const projectsData = await projectsResponse.json();
    
                if (projectsData && projectsData.rows) {
                    const projectNames = projectsData.rows.map(row => row.displayName);
                    return {
                        content: [{ type: 'text', text: `Projects retrieved: ${JSON.stringify(projectNames)}` }]
                    };
                } else {
                    throw new Error("Failed to retrieve projects");
                }
            } catch (e) {
                return {
                    content: [{ type: 'text', text: `Error retrieving projects: ${e.message}` }]
                };
            }
        }
    )
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. It fails to indicate that this is a read-only operation, does not describe the return format (e.g., array of project names/IDs), and omits error handling behavior (e.g., what happens if the application doesn't exist).

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?

The description is a single, efficient sentence of 11 words. It is front-loaded with the verb and contains no redundant or wasted text. Every word contributes to understanding the tool's function.

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 low complexity (single string parameter, no nested objects) and complete schema coverage, the description is minimally adequate. However, without an output schema, the omission of return value description (e.g., whether it returns IDs, names, or objects) leaves a noticeable gap for an integration 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?

With 100% schema description coverage, the input schema already fully documents the 'application' parameter. The description mentions 'for a given application' which aligns with but does not significantly extend the schema definition. This meets the baseline for high-coverage schemas.

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 action ('Get'), resource ('list of projects in Plan'), and scope ('for a given application'). It effectively distinguishes from sibling get_applications by specifying projects are retrieved within a specific application context, though the verb 'Get' is slightly generic compared to 'Retrieve' or 'List'.

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?

The description provides no explicit guidance on when to use this tool versus siblings like get_applications or get_available_components. While the required 'application' parameter implies a prerequisite workflow step, there is no text describing the sequencing or alternative tools.

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