Skip to main content
Glama
OctopusDeploy

Octopus Deploy MCP Server

Official

list_certificates

Read-only

Retrieve and filter certificates from an Octopus Deploy space to manage SSL/TLS credentials for secure deployments.

Instructions

List certificates in a space

This tool lists all certificates in a given space. The space name is required. You can optionally filter by various parameters like name, archived status, tenant, etc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
spaceNameYes
skipNo
takeNo
searchNo
archivedNo
tenantNo
firstResultNo
orderByNo
idsNo
partialNameNo

Implementation Reference

  • The handler function that implements the core logic of the 'list_certificates' tool. It creates an Octopus Deploy client, resolves the space ID, fetches certificates with optional filters, maps them using mapCertificateResource, and returns structured JSON data.
      async ({
        spaceName,
        skip,
        take,
        search,
        archived,
        tenant,
        firstResult,
        orderBy,
        ids,
        partialName,
      }) => {
        const configuration = getClientConfigurationFromEnvironment();
        const client = await Client.create(configuration);
        const spaceId = await resolveSpaceId(client, spaceName);
    
        const response = await client.get<ResourceCollection<CertificateResource>>(
          "~/api/{spaceId}/certificates{?skip,take,search,archived,tenant,firstResult,orderBy,ids,partialName}",
          {
            spaceId,
            skip,
            take,
            search,
            archived,
            tenant,
            firstResult,
            orderBy,
            ids,
            partialName,
          }
        );
    
        const certificates = response.Items.map((cert: CertificateResource) => mapCertificateResource(cert));
    
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify({
                totalResults: response.TotalResults,
                itemsPerPage: response.ItemsPerPage,
                numberOfPages: response.NumberOfPages,
                lastPageNumber: response.LastPageNumber,
                items: certificates,
              }),
            },
          ],
        };
      }
    );
  • Zod input schema defining the parameters for the 'list_certificates' tool, including required spaceName and optional filters.
    {
      spaceName: z.string(),
      skip: z.number().optional(),
      take: z.number().optional(),
      search: z.string().optional(),
      archived: z.boolean().optional(),
      tenant: z.string().optional(),
      firstResult: z.number().optional(),
      orderBy: z.string().optional(),
      ids: z.array(z.string()).optional(),
      partialName: z.string().optional(),
    },
  • Registers the 'list_certificates' tool in the TOOL_REGISTRY with its configuration and registration function for conditional enabling.
    registerToolDefinition({
      toolName: "list_certificates",
      config: { toolset: "certificates", readOnly: true },
      registerFn: registerListCertificatesTool,
    });
  • The function that registers the 'list_certificates' tool directly on the MCP server, specifying name, description, input schema, output hints, and handler.
    export function registerListCertificatesTool(server: McpServer) {
      server.tool(
        "list_certificates",
        `List certificates in a space
    
    This tool lists all certificates in a given space. The space name is required. You can optionally filter by various parameters like name, archived status, tenant, etc.`,
        {
          spaceName: z.string(),
          skip: z.number().optional(),
          take: z.number().optional(),
          search: z.string().optional(),
          archived: z.boolean().optional(),
          tenant: z.string().optional(),
          firstResult: z.number().optional(),
          orderBy: z.string().optional(),
          ids: z.array(z.string()).optional(),
          partialName: z.string().optional(),
        },
        {
          title: "List all certificates in an Octopus Deploy space",
          readOnlyHint: true,
        },
        async ({
          spaceName,
          skip,
          take,
          search,
          archived,
          tenant,
          firstResult,
          orderBy,
          ids,
          partialName,
        }) => {
          const configuration = getClientConfigurationFromEnvironment();
          const client = await Client.create(configuration);
          const spaceId = await resolveSpaceId(client, spaceName);
    
          const response = await client.get<ResourceCollection<CertificateResource>>(
            "~/api/{spaceId}/certificates{?skip,take,search,archived,tenant,firstResult,orderBy,ids,partialName}",
            {
              spaceId,
              skip,
              take,
              search,
              archived,
              tenant,
              firstResult,
              orderBy,
              ids,
              partialName,
            }
          );
    
          const certificates = response.Items.map((cert: CertificateResource) => mapCertificateResource(cert));
    
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify({
                  totalResults: response.TotalResults,
                  itemsPerPage: response.ItemsPerPage,
                  numberOfPages: response.NumberOfPages,
                  lastPageNumber: response.LastPageNumber,
                  items: certificates,
                }),
              },
            ],
          };
        }
      );
    }
  • Supporting utility function that maps the full Octopus Deploy CertificateResource to a simplified object returned by the tool.
    export function mapCertificateResource(cert: CertificateResource) {
      return {
        spaceId: cert.SpaceId,
        id: cert.Id,
        name: cert.Name,
        notes: cert.Notes,
        thumbprint: cert.Thumbprint,
        subjectDistinguishedName: cert.SubjectDistinguishedName,
        issuerDistinguishedName: cert.IssuerDistinguishedName,
        subjectCommonName: cert.SubjectCommonName,
        subjectOrganization: cert.SubjectOrganization,
        issuerCommonName: cert.IssuerCommonName,
        issuerOrganization: cert.IssuerOrganization,
        notAfter: cert.NotAfter,
        notBefore: cert.NotBefore,
        isExpired: cert.IsExpired,
        version: cert.Version,
        serialNumber: cert.SerialNumber,
        signatureAlgorithmName: cert.SignatureAlgorithmName,
        environmentIds: cert.EnvironmentIds,
        tenantIds: cert.TenantIds,
        tenantTags: cert.TenantTags,
        certificateDataFormat: cert.CertificateDataFormat,
        archived: cert.Archived,
        replacedBy: cert.ReplacedBy,
        selfSigned: cert.SelfSigned,
        selfSignedCertificateCurve: cert.SelfSignedCertificateCurve,
        hasPrivateKey: cert.HasPrivateKey,
        tenantedDeploymentParticipation: cert.TenantedDeploymentParticipation,
        subjectAlternativeNames: cert.SubjectAlternativeNames,
      };
    }
Behavior3/5

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

Annotations already declare readOnlyHint=true, so the agent knows this is a safe read operation. The description adds that it 'lists all certificates' and mentions optional filtering, which provides some behavioral context beyond the annotations. However, it doesn't describe pagination behavior (skip/take parameters), ordering, or what 'all certificates' means in practice.

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 appropriately brief with two sentences that get straight to the point. The first sentence states the core purpose, and the second adds parameter context. There's no wasted verbiage, though it could be slightly more structured with bullet points for the filtering options.

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 10 parameters (0% schema coverage), no output schema, and only basic annotations, the description is insufficient. It doesn't explain the return format, pagination behavior, error conditions, or most parameter semantics. The agent would struggle to use this tool effectively without trial and error.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage for 10 parameters, the description carries full burden for explaining parameters. It mentions 'space name is required' and 'optionally filter by various parameters like name, archived status, tenant, etc.' but only names 4 of 10 parameters, leaving most undocumented. The description doesn't explain what 'skip', 'take', 'firstResult', 'orderBy', or 'ids' do.

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 action ('list certificates') and resource ('in a given space'), making the purpose immediately understandable. It distinguishes from sibling 'get_certificate' by indicating this returns multiple items rather than a single one. However, it doesn't explicitly differentiate from other list_* tools beyond the certificate resource type.

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 guidance on when to use this tool versus alternatives like 'get_certificate' or other list_* tools. It mentions optional filtering parameters but doesn't explain when filtering is appropriate or what the default behavior is when filters aren't applied.

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