Skip to main content
Glama

get_user

Retrieve user information from Gitee by specifying a username. Use this tool to access user details for repository management or integration purposes.

Instructions

获取 Gitee 用户信息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usernameYesUsername

Implementation Reference

  • The main handler function that fetches the specified Gitee user's information using the API.
    export async function getUser(username: string) {
      username = validateOwnerName(username);
    
      const url = `/users/${username}`;
      const response = await giteeRequest(url, "GET");
    
      return GiteeUserSchema.parse(response);
    }
  • Zod schema defining the input parameters for the get_user tool (username).
    export const GetUserSchema = z.object({
      // 用户名
      username: z.string().describe("Username"),
    });
  • index.ts:253-261 (registration)
    Registers the get_user tool with the MCP server, linking schema and handler.
    server.registerTool({
      name: "get_user",
      description: "获取 Gitee 用户信息",
      schema: userOperations.GetUserSchema,
      handler: async (params: any) => {
        const { username } = params;
        return await userOperations.getUser(username);
      },
    });

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/normal-coder/gitee-mcp-server'

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