Skip to main content
Glama

yuque_get_user

Retrieve authenticated user's account details from Yuque, including profile and identification data.

Instructions

获取当前用户信息 (Get current user information)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the 'yuque_get_user' tool logic. It calls client.getUser() and returns the user info as JSON text content.
    async function handleGetUser(client: YuqueClient) {
      const user = await client.getUser();
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(user, null, 2),
          },
        ],
      };
    }
  • Registration/schema definition of the 'yuque_get_user' tool. It has no required input parameters (empty schema).
    {
      name: 'yuque_get_user',
      description: '获取当前用户信息 (Get current user information)',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • The switch-case dispatch in the main handleTool function that routes 'yuque_get_user' to the handleGetUser function.
        switch (name) {
          case 'yuque_get_user':
            return await handleGetUser(client);
    
          case 'yuque_get_repos':
            return await handleGetRepos(client, args as { userId?: string });
    
          case 'yuque_get_docs':
            return await handleGetDocs(
              client,
              args as { repoId: number; limit?: number; offset?: number }
            );
    
          case 'yuque_get_doc':
            return await handleGetDoc(
              client,
              args as { docId: number; repoId: number }
            );
    
          case 'yuque_create_doc':
            return await handleCreateDoc(
              client,
              args as {
                repoId: number;
                title: string;
                content: string;
                format?: 'markdown' | 'lake' | 'html';
              }
            );
    
          case 'yuque_update_doc':
            return await handleUpdateDoc(
              client,
              args as {
                docId: number;
                repoId: number;
                title?: string;
                content?: string;
                format?: 'markdown' | 'lake' | 'html';
              }
            );
    
          case 'yuque_delete_doc':
            return await handleDeleteDoc(
              client,
              args as { docId: number; repoId: number }
            );
    
          case 'yuque_search_docs':
            return await handleSearchDocs(
              client,
              args as { query: string; repoId?: number }
            );
    
          case 'yuque_create_repo':
            return await handleCreateRepo(
              client,
              args as {
                name: string;
                description?: string;
                isPublic?: boolean;
              }
            );
    
          default:
            throw new Error(`Unknown tool: ${name}`);
        }
      } catch (error) {
        throw new Error(
          `Error executing ${name}: ${
            error instanceof Error ? error.message : String(error)
          }`
        );
      }
    }
  • The YuqueClient.getUser() method used by the handler. It makes a GET request to the '/user' endpoint of the Yuque API.
    async getUser(): Promise<YuqueUser> {
      return this.request<YuqueUser>('/user');
    }
  • The YuqueUser type/interface definition returned by the getUser method.
    export interface YuqueUser {
      id: number;
      type: string;
      login: string;
      name: string;
      description?: string;
      avatar_url: string;
      public: number;
      followers_count: number;
      following_count: number;
      created_at: string;
      updated_at: string;
    }
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. It only states 'get current user information' without describing whether authentication is required, what data is returned, or any side effects. This is insufficient for an agent to understand the tool's behavior beyond its basic function.

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 sentence that is front-loaded and precise. Every word serves a purpose with no redundancy. It is optimally concise.

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?

Despite the tool's simplicity (no parameters, no output schema), the description is too sparse. It does not hint at what the returned 'user information' includes, which would help an agent anticipate or use the result. The context signals indicate no output schema, so the description should compensate, but it does not.

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 zero parameters, and the schema coverage is 100% (empty). According to guidelines, baseline is 4 for zero parameters. The description adds no param information because none exist, but it is still adequate.

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?

The description explicitly states the tool's purpose: '获取当前用户信息 (Get current user information)'. It clearly identifies the action (get) and resource (current user information), leaving no ambiguity. No sibling tool has a similar purpose, so differentiation is not needed.

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?

The description does not provide explicit guidance on when to use this tool versus alternatives or any conditions for use. However, given that it is the only tool for retrieving current user info, usage is implied. No exclusions or alternative tool mentions are provided.

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

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