Skip to main content
Glama
OctopusDeploy

Octopus Deploy MCP Server

Official

get_missing_tenant_variables

Read-only

Identify tenant variables with missing values in Octopus Deploy. Filter by tenant, project, or environment to locate configuration gaps.

Instructions

Get missing tenant variables

This tool retrieves tenant variables that are missing values. Optionally filter by tenant, project, or environment.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
spaceNameYesThe space name
tenantIdNoFilter by specific tenant ID
projectIdNoFilter by specific project ID
environmentIdNoFilter by specific environment ID
includeDetailsNoInclude detailed information about missing variables

Implementation Reference

  • The handler function that implements the core logic of the 'get_missing_tenant_variables' tool. It creates an Octopus Deploy client, fetches missing tenant variables using TenantRepository, and returns the results as JSON in markdown content.
    async ({ spaceName, tenantId, projectId, environmentId, includeDetails = false }) => {
      const configuration = getClientConfigurationFromEnvironment();
      const client = await Client.create(configuration);
      const tenantRepository = new TenantRepository(client, spaceName);
    
      const filterOptions = {
        tenantId,
        projectId,
        environmentId
      };
    
      const missingVariables = await tenantRepository.missingVariables(filterOptions, includeDetails);
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify({
              filters: filterOptions,
              includeDetails,
              missingVariables
            }),
          },
        ],
      };
    }
  • Zod schema defining the input parameters for the tool, including required spaceName and optional filters.
    { 
      spaceName: z.string().describe("The space name"),
      tenantId: z.string().optional().describe("Filter by specific tenant ID"),
      projectId: z.string().optional().describe("Filter by specific project ID"),
      environmentId: z.string().optional().describe("Filter by specific environment ID"),
      includeDetails: z.boolean().optional().describe("Include detailed information about missing variables")
    },
  • Registers the tool in the TOOL_REGISTRY, specifying its name, toolset, read-only status, and the function to register it on the MCP server.
    registerToolDefinition({
      toolName: "get_missing_tenant_variables",
      config: { toolset: "tenants", readOnly: true },
      registerFn: registerGetMissingTenantVariablesTool,
    });
  • The registration function that calls server.tool() to register the tool on the MCP server, including name, description, schema, output hints, and handler.
    export function registerGetMissingTenantVariablesTool(server: McpServer) {
      server.tool(
        "get_missing_tenant_variables",
        `Get missing tenant variables
      
      This tool retrieves tenant variables that are missing values. Optionally filter by tenant, project, or environment.`,
        { 
          spaceName: z.string().describe("The space name"),
          tenantId: z.string().optional().describe("Filter by specific tenant ID"),
          projectId: z.string().optional().describe("Filter by specific project ID"),
          environmentId: z.string().optional().describe("Filter by specific environment ID"),
          includeDetails: z.boolean().optional().describe("Include detailed information about missing variables")
        },
        {
          title: "Get missing tenant variables from Octopus Deploy",
          readOnlyHint: true,
        },
        async ({ spaceName, tenantId, projectId, environmentId, includeDetails = false }) => {
          const configuration = getClientConfigurationFromEnvironment();
          const client = await Client.create(configuration);
          const tenantRepository = new TenantRepository(client, spaceName);
    
          const filterOptions = {
            tenantId,
            projectId,
            environmentId
          };
    
          const missingVariables = await tenantRepository.missingVariables(filterOptions, includeDetails);
    
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify({
                  filters: filterOptions,
                  includeDetails,
                  missingVariables
                }),
              },
            ],
          };
        }
      );
    }
  • Top-level function that registers all enabled tools by calling their individual registerFn, including get_missing_tenant_variables if enabled.
    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);
        }
      }
    }
Behavior3/5

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

Annotations provide readOnlyHint=true, so the agent knows this is a safe read operation. The description adds context about retrieving 'missing values' and optional filtering, which clarifies the tool's behavior beyond annotations. However, it doesn't disclose other traits like rate limits, auth needs, or output format, keeping it at a baseline level with some added value.

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 concise and front-loaded: the first sentence states the core purpose, and the second adds filtering options. There's no wasted text, but it could be slightly more structured (e.g., bullet points for filters) to enhance clarity, though it's still efficient.

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 tool's moderate complexity (5 parameters, read-only, no output schema), the description is adequate but has gaps. It covers purpose and filtering but doesn't explain return values, error handling, or dependencies. With annotations covering safety, it's minimally viable but not fully complete for an agent's needs.

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 100%, so the schema fully documents all 5 parameters. The description mentions optional filtering by tenant, project, or environment, which aligns with parameters but doesn't add new semantics beyond the schema. With high coverage, the baseline is 3, and the description doesn't significantly compensate or detract.

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: 'retrieves tenant variables that are missing values.' It specifies the resource (tenant variables) and action (retrieve missing ones). However, it doesn't explicitly differentiate from sibling tools like 'get_tenant_variables' or 'get_variables' beyond the 'missing' qualifier, which is why it doesn't reach a 5.

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 implied usage guidance by mentioning optional filters (tenant, project, environment), suggesting when to use it for filtered queries. However, it lacks explicit when-to-use vs. alternatives (e.g., compared to 'get_tenant_variables'), no exclusions, and no prerequisites, so it's not fully explicit.

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