Skip to main content
Glama

get_user

Retrieve GitHub user information by providing a username to access profile details through the GitHub MCP Server.

Instructions

Get GitHub user information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usernameYesGitHub username

Implementation Reference

  • Handler logic for the 'get_user' tool: validates username parameter, fetches user data from GitHub API endpoint `/users/{username}`, returns JSON response or error message.
    if (request.params.name === 'get_user') {
      const username = args.username;
      if (!username) {
        throw new McpError(ErrorCode.InvalidParams, 'Username is required');
      }
    
      try {
        const response = await this.axiosInstance.get(`/users/${username}`);
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(response.data, null, 2),
            },
          ],
        };
      } catch (error) {
        if (axios.isAxiosError(error)) {
          return {
            content: [
              {
                type: 'text',
                text: `GitHub API error: ${
                  error.response?.data.message ?? error.message
                }`,
              },
            ],
            isError: true,
          };
        }
        throw error;
      }
  • Input schema definition for the 'get_user' tool, specifying required 'username' string parameter.
    inputSchema: {
      type: 'object',
      properties: {
        username: {
          type: 'string',
          description: 'GitHub username',
        },
      },
      required: ['username'],
    },
  • src/index.ts:96-109 (registration)
    Registration of the 'get_user' tool in the ListToolsRequestSchema handler, including name, description, and input schema.
    {
      name: 'get_user',
      description: 'Get GitHub user information',
      inputSchema: {
        type: 'object',
        properties: {
          username: {
            type: 'string',
            description: 'GitHub username',
          },
        },
        required: ['username'],
      },
    },
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 of behavioral disclosure. 'Get GitHub user information' implies a read-only operation, but it doesn't specify if it requires authentication, rate limits, what data is returned, or error handling. For a tool with no annotations, this leaves significant behavioral gaps.

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 'Get GitHub user information' is a single, efficient sentence that is front-loaded and wastes no words. It directly conveys the core purpose without unnecessary elaboration, 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 and no output schema, the description is incomplete. It doesn't explain what user information is retrieved (e.g., profile data, repositories), the return format, or any behavioral aspects like error cases. For a tool with this complexity and lack of structured data, more context is needed.

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?

The input schema has 100% description coverage, with the 'username' parameter clearly documented as 'GitHub username'. The description doesn't add any meaning beyond this, such as format examples or constraints. With high schema coverage, the baseline is 3, as the schema does the heavy lifting.

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 'Get GitHub user information' clearly states the verb 'Get' and resource 'GitHub user information', making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'create_repo' or 'push_to_repo', which are clearly different operations, so it doesn't need sibling differentiation but could be more specific about what user information is retrieved.

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 doesn't mention prerequisites, context for usage, or any exclusions. While sibling tools are for different operations (creating and pushing to repos), there's no explicit guidance on usage scenarios for this tool.

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/oghenetejiriorukpegmail/github-mcp'

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