Skip to main content
Glama
OctopusDeploy

Octopus Deploy MCP Server

Official

list_certificates

Retrieve and filter certificates within a specific Octopus Deploy space to manage security credentials and access configurations.

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
archivedNo
firstResultNo
idsNo
orderByNo
partialNameNo
searchNo
skipNo
spaceNameYes
takeNo
tenantNo

Implementation Reference

  • The handler function for the 'list_certificates' tool. It creates an Octopus Deploy client, resolves the space ID, queries the certificates API with provided filters, maps the certificate resources, and returns a structured JSON response.
    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, }), }, ], }; }
  • Input schema using Zod validators for the tool parameters: spaceName (required string), optional numeric and string filters for pagination, search, status, and selection.
    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(), },
  • The primary registration function for the 'list_certificates' tool, called by the tool registry to register it on the MCP server with 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, }), }, ], }; } ); }
  • Self-registration of the tool in the global TOOL_REGISTRY, specifying toolset and read-only config for conditional enabling in index.ts.
    registerToolDefinition({ toolName: "list_certificates", config: { toolset: "certificates", readOnly: true }, registerFn: registerListCertificatesTool, });
  • Import statement that triggers the self-registration of listCertificates tool when index.ts is imported.
    import './listCertificates.js';

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