Skip to main content
Glama
chenshuai2144

MCP-Server

get-github-user

Retrieve GitHub user information by providing a username to access profile data through the MCP server.

Instructions

根据用户名获取 Github 用户信息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usernameNo

Implementation Reference

  • Handler function that fetches GitHub user information from the GitHub API based on the provided username and returns it as a JSON string in text content.
    async ({ username }) => {
      // 获取网格点数据的 URL
      const pointsUrl = `https://api.github.com/users/${username}`;
      const data: Root = await fetch(pointsUrl).then((response) =>
        response.json(),
      );
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(data),
          },
        ],
      };
    },
  • src/index.ts:77-102 (registration)
    Registration of the 'get-github-user' tool using server.tool, specifying name, description, input schema, and handler function.
    server.tool(
      // 工具名称
      'get-github-user',
      // 工具描述
      '根据用户名获取 Github 用户信息',
      // 工具参数
      {
        username: z.string().optional(),
      },
      // 工具的异步处理函数
      async ({ username }) => {
        // 获取网格点数据的 URL
        const pointsUrl = `https://api.github.com/users/${username}`;
        const data: Root = await fetch(pointsUrl).then((response) =>
          response.json(),
        );
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(data),
            },
          ],
        };
      },
    );
  • Zod schema defining the input parameter 'username' as an optional string.
    {
      username: z.string().optional(),
    },
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. The description only states what the tool does ('get Github user information') without adding any behavioral traits like whether it requires authentication, has rate limits, returns specific error codes, or what the output format might be. This leaves significant gaps in understanding how the tool behaves in practice.

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, clear sentence in Chinese that directly states the tool's function without any unnecessary words. It's front-loaded with the core purpose and efficiently conveys the essential information in minimal space, 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's simplicity (1 parameter, no annotations, no output schema), the description is incomplete. It lacks details on behavioral aspects (e.g., authentication, error handling) and output expectations, which are crucial for an AI agent to use the tool correctly. While the purpose is clear, the overall context needed for effective tool invocation is insufficient.

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 1 parameter ('username') with 0% description coverage, meaning the schema provides no semantic details. The description implies the parameter's purpose ('根据用户名' means 'based on username'), adding some meaning beyond the bare schema. However, it doesn't specify format constraints (e.g., case sensitivity, valid characters) or examples, so it only partially compensates for the low schema coverage.

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: '根据用户名获取 Github 用户信息' translates to 'Get Github user information based on username.' This specifies both the verb ('get') and resource ('Github user information'), making the purpose unambiguous. However, it doesn't differentiate from the sibling tool 'get-weather-forecast' since they operate on completely different domains, so sibling differentiation isn't relevant here.

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 any prerequisites, constraints, or scenarios where this tool is preferred over other methods. While the sibling tool is unrelated (weather vs. GitHub), there's still no usage context provided, such as rate limits or authentication needs.

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/chenshuai2144/mcp-server'

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