Skip to main content
Glama
OctopusDeploy

Octopus Deploy MCP Server

Official

Get current user information

get_current_user
Read-onlyIdempotent

Retrieve details of the currently authenticated user to verify identity and permissions in Octopus Deploy.

Instructions

Get information about the current authenticated user

This tool retrieves information about the currently authenticated user from the Octopus Deploy API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the 'get_current_user' tool logic. It creates an Octopus API client, calls GET ~/api/users/me, and returns the current user's details (id, username, displayName, isActive, isService, emailAddress, canPasswordBeEdited, isRequestor) as JSON text content.
      async () => {
        try {
          const configuration = getClientConfigurationFromEnvironment();
          const client = await Client.create(configuration);
    
          const user = await client.get<CurrentUser>("~/api/users/me");
    
          const currentUser = {
            id: user.Id,
            username: user.Username,
            displayName: user.DisplayName,
            isActive: user.IsActive,
            isService: user.IsService,
            emailAddress: user.EmailAddress,
            canPasswordBeEdited: user.CanPasswordBeEdited,
            isRequestor: user.IsRequestor,
          };
    
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify(currentUser),
              },
            ],
          };
        } catch (error) {
          handleOctopusApiError(error, {});
        }
      }
    );
  • The CurrentUser interface defines the shape of the user data returned by the tool (Id, Username, DisplayName, IsActive, IsService, EmailAddress, CanPasswordBeEdited, IsRequestor).
    interface CurrentUser {
      Id: string;
      Username: string;
      DisplayName: string;
      IsActive: boolean;
      IsService: boolean;
      EmailAddress: string;
      CanPasswordBeEdited: boolean;
      IsRequestor: boolean;
    }
  • Registers the tool definition in the global TOOL_REGISTRY with toolName 'get_current_user', toolset 'context', and readOnly: true. The registerFn is registerGetCurrentUserTool which calls server.registerTool() with the name 'get_current_user'.
    registerToolDefinition({
      toolName: "get_current_user",
      config: { toolset: "context", readOnly: true },
      registerFn: registerGetCurrentUserTool,
    });
  • The registerGetCurrentUserTool function that calls server.registerTool('get_current_user') with inputSchema: {}, annotations from READ_ONLY_TOOL_ANNOTATIONS, and the async handler.
    export function registerGetCurrentUserTool(server: McpServer) {
      server.registerTool(
        "get_current_user",
        {
  • Cached version of getCurrentUser used by other tools (like findInterruptions). Implements a 1-hour TTL cache around the ~/api/users/me API call to avoid redundant requests.
    export async function getCurrentUserCached(client: Client): Promise<CurrentUser> {
      const now = Date.now();
      if (cached && now - cached.timestamp < CACHE_TTL) {
        return cached.user;
      }
    
      const user = await client.get<CurrentUser>("~/api/users/me");
      cached = { user, timestamp: now };
      return user;
    }
Behavior3/5

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

Annotations already declare readOnlyHint, destructiveHint, and idempotentHint. Description adds no extra behavioral context beyond stating it retrieves information. No contradiction, but no 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences, front-loaded with purpose. No redundancy or unnecessary text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a parameterless read-only tool, the description is adequate. It explains the tool's purpose but could optionally list the types of information returned (e.g., email, username) for extra clarity.

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

Parameters4/5

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

No parameters exist, so baseline is 4. Description adds no parameter information, but none is needed since the schema covers all.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states verb ('Get') and resource ('current authenticated user information'). No sibling tools perform a similar function, so no need for differentiation. Purpose is unambiguous.

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?

No explicit guidance on when to use this tool or when not to. While the use case is obvious, the description lacks any context about alternatives or prerequisites, which would be helpful.

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