Skip to main content
Glama
OctopusDeploy

Octopus Deploy MCP Server

Official

list_projects

Read-only

Retrieve all projects within a specified Octopus Deploy space to manage deployment processes, lifecycles, and variables. Filter results by partial name match for targeted access.

Instructions

This tool lists all projects in a given space. Projects let you manage software applications and services, each with their own deployment process, lifecycles, and variables. Projects are where you define what you are deploying and how it should be deployed. The space name is required, if you can't find the space name, ask the user directly for the name of the space. Optionally filter by partial name match using partialName parameter.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
spaceNameYes
partialNameNo
skipNo
takeNo

Implementation Reference

  • The handler function for the 'list_projects' tool. It creates an Octopus Deploy client, queries the project repository for the given space with optional filters, and returns a JSON-formatted response containing project details.
    async ({ spaceName, partialName, skip, take }) => {
      const configuration = getClientConfigurationFromEnvironment();
      const client = await Client.create(configuration);
      const projectRepository = new ProjectRepository(client, spaceName);
    
      const projectsResponse = await projectRepository.list({ partialName, skip, take });
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify({
              totalResults: projectsResponse.TotalResults,
              itemsPerPage: projectsResponse.ItemsPerPage,
              numberOfPages: projectsResponse.NumberOfPages,
              lastPageNumber: projectsResponse.LastPageNumber,
              items: projectsResponse.Items.map((project: Project) => ({
                spaceId: project.SpaceId,
                id: project.Id,
                name: project.Name,
                description: project.Description,
                slug: project.Slug,
                deploymentProcessId: project.DeploymentProcessId,
                lifecycleId: project.LifecycleId,
                isDisabled: project.IsDisabled,
                repositoryUrl:
                  project.PersistenceSettings.Type === "VersionControlled"
                    ? project.PersistenceSettings.Url
                    : null,
              })),
            }),
          },
        ],
      };
    }
  • Input schema for the 'list_projects' tool using Zod, defining required 'spaceName' and optional 'partialName', 'skip', 'take' parameters.
    {
      spaceName: z.string(), 
      partialName: z.string().optional(),
      skip: z.number().optional(),
      take: z.number().optional()
    },
  • The registerListProjectsTool function that registers the 'list_projects' tool on the MCP server, including name, description, input schema, metadata, and handler.
    export function registerListProjectsTool(server: McpServer) {
      server.tool(
        "list_projects",
        `This tool lists all projects in a given space. ${projectsDescription} The space name is required, if you can't find the space name, ask the user directly for the name of the space. Optionally filter by partial name match using partialName parameter.`,
        {
          spaceName: z.string(), 
          partialName: z.string().optional(),
          skip: z.number().optional(),
          take: z.number().optional()
        },
        {
          title: "List all projects in an Octopus Deploy space",
          readOnlyHint: true,
        },
        async ({ spaceName, partialName, skip, take }) => {
          const configuration = getClientConfigurationFromEnvironment();
          const client = await Client.create(configuration);
          const projectRepository = new ProjectRepository(client, spaceName);
    
          const projectsResponse = await projectRepository.list({ partialName, skip, take });
    
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify({
                  totalResults: projectsResponse.TotalResults,
                  itemsPerPage: projectsResponse.ItemsPerPage,
                  numberOfPages: projectsResponse.NumberOfPages,
                  lastPageNumber: projectsResponse.LastPageNumber,
                  items: projectsResponse.Items.map((project: Project) => ({
                    spaceId: project.SpaceId,
                    id: project.Id,
                    name: project.Name,
                    description: project.Description,
                    slug: project.Slug,
                    deploymentProcessId: project.DeploymentProcessId,
                    lifecycleId: project.LifecycleId,
                    isDisabled: project.IsDisabled,
                    repositoryUrl:
                      project.PersistenceSettings.Type === "VersionControlled"
                        ? project.PersistenceSettings.Url
                        : null,
                  })),
                }),
              },
            ],
          };
        }
      );
    }
  • Registers the tool definition in the TOOL_REGISTRY, specifying toolset 'projects' and read-only, linking to the register function for conditional registration.
    registerToolDefinition({
      toolName: "list_projects",
      config: { toolset: "projects", readOnly: true },
      registerFn: registerListProjectsTool,
    });
  • The top-level registerTools function that iterates over all tool definitions and calls their registerFn if enabled by config.
    export function registerTools(server: McpServer, config: ToolsetConfig = {}) {
      // Iterate through all registered tools and register those that are enabled
      for (const [, toolRegistration] of TOOL_REGISTRY) {
        if (isToolEnabled(toolRegistration, config)) {
          toolRegistration.registerFn(server);
        }
      }
    }
Behavior4/5

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

Annotations provide readOnlyHint=true and a title, but the description adds valuable behavioral context: it explains what projects are ('manage software applications...'), mentions deployment processes and variables, and specifies that the space name is required with a fallback action ('ask the user'). It doesn't contradict annotations and adds practical guidance beyond the structured data.

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?

The description is well-structured and front-loaded with the core purpose. The first sentence states the main function, followed by explanatory context and parameter details. It avoids redundancy, though the project explanation could be slightly trimmed for tighter focus on tool usage.

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 4 parameters with 0% schema coverage and no output schema, the description provides adequate but incomplete context. It covers the required parameter and one optional, but misses pagination parameters (skip, take) and doesn't detail return values. With annotations covering read-only nature, it's minimally viable but has clear gaps for full agent understanding.

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 0%, so the description must compensate. It explains the purpose of spaceName ('required') and partialName ('filter by partial name match'), covering 2 of 4 parameters. However, it omits skip and take (likely for pagination), leaving them undocumented. This partial coverage meets the baseline for moderate schema support.

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 states the tool's purpose: 'lists all projects in a given space' with a specific verb ('lists') and resource ('projects'). It distinguishes from siblings by focusing on projects rather than accounts, certificates, deployments, etc., though it doesn't explicitly contrast with similar list tools like list_accounts or list_tenants.

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 provides some usage context: it requires a space name and suggests asking the user if unknown, and mentions optional filtering by partial name. However, it lacks explicit guidance on when to use this tool versus alternatives (e.g., list_releases_for_project for project-specific releases) or when not to use it (e.g., for non-project resources).

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/OctopusDeploy/mcp-server'

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