Skip to main content
Glama
Tiberriver256

Azure DevOps MCP Server

get_me

Retrieve authenticated user details including ID, display name, and email from Azure DevOps for identity verification and access management.

Instructions

Get details of the authenticated user (id, displayName, email)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler function that implements the get_me tool logic by fetching the authenticated user's profile from the Azure DevOps Profile API using axios and appropriate authentication.
    export async function getMe(connection: WebApi): Promise<UserProfile> {
      try {
        // Extract organization from the connection URL
        const { organization } = extractOrgFromUrl(connection.serverUrl);
    
        // Get the authorization header
        const authHeader = await getAuthorizationHeader();
    
        // Make direct call to the Profile API endpoint
        // Note: This API is in the vssps.dev.azure.com domain, not dev.azure.com
        const response = await axios.get(
          `https://vssps.dev.azure.com/${organization}/_apis/profile/profiles/me?api-version=7.1`,
          {
            headers: {
              Authorization: authHeader,
              'Content-Type': 'application/json',
            },
          },
        );
    
        const profile = response.data;
    
        // Return the user profile with required fields
        return {
          id: profile.id,
          displayName: profile.displayName || '',
          email: profile.emailAddress || '',
        };
      } catch (error) {
        // Handle authentication errors
        if (
          axios.isAxiosError(error) &&
          (error.response?.status === 401 || error.response?.status === 403)
        ) {
          throw new AzureDevOpsAuthenticationError(
            `Authentication failed: ${error.message}`,
          );
        }
    
        // If it's already an AzureDevOpsError, rethrow it
        if (error instanceof AzureDevOpsError) {
          throw error;
        }
    
        // Otherwise, wrap it in a generic error
        throw new AzureDevOpsError(
          `Failed to get user information: ${error instanceof Error ? error.message : String(error)}`,
        );
      }
  • Registration of the get_me tool in the usersTools array, including name, description, and input schema derived from Zod schema.
    export const usersTools: ToolDefinition[] = [
      {
        name: 'get_me',
        description:
          'Get details of the authenticated user (id, displayName, email)',
        inputSchema: zodToJsonSchema(GetMeSchema),
      },
    ];
  • Zod input schema for the get_me tool, which requires no parameters (empty object).
    export const GetMeSchema = z.object({}).strict();
  • MCP request handler for users tools, dispatching to getMe for 'get_me' tool name and formatting response as MCP content.
    export const handleUsersRequest: RequestHandler = async (
      connection: WebApi,
      request: CallToolRequest,
    ): Promise<{ content: Array<{ type: string; text: string }> }> => {
      switch (request.params.name) {
        case 'get_me': {
          const result = await getMe(connection);
          return {
            content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
          };
        }
        default:
          throw new Error(`Unknown users tool: ${request.params.name}`);
      }
    };
  • Request identifier function that checks if the tool name is 'get_me' to route to users feature.
    export const isUsersRequest: RequestIdentifier = (
      request: CallToolRequest,
    ): boolean => {
      const toolName = request.params.name;
      return ['get_me'].includes(toolName);
    };
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states the tool retrieves user details but lacks behavioral context such as authentication requirements, rate limits, error conditions, or response format. This is inadequate for a tool with zero annotation coverage.

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?

The description is a single, efficient sentence that front-loads the purpose ('Get details of the authenticated user') and specifies key data fields. There is no wasted text, making it highly concise and well-structured.

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?

Given the tool has no annotations, no output schema, and the description lacks behavioral details (e.g., authentication, response structure), it is incomplete. While purpose is clear, the absence of critical context for a user-details tool makes it inadequate overall.

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?

The tool has 0 parameters, and schema description coverage is 100%, so no parameter documentation is needed. The description appropriately does not discuss parameters, aligning with the schema. A baseline of 4 is applied as it compensates by not adding unnecessary information.

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 verb ('Get') and resource ('details of the authenticated user'), specifying what data is retrieved (id, displayName, email). However, it does not explicitly distinguish this from potential siblings like 'get_project' or 'get_repository', which target different resources, though the user focus is inherently distinct.

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. It does not mention prerequisites (e.g., authentication context) or compare it to other user-related tools (none are listed in siblings, but general context is missing).

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/Tiberriver256/mcp-server-azure-devops'

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