Skip to main content
Glama

yuque_get_repos

Retrieve knowledge repository lists from Yuque platform. Specify a user ID to get their repositories or use default for current user's repositories.

Instructions

获取知识库列表 (List knowledge repositories)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userIdNo用户ID,不提供则获取当前用户的知识库 (User ID, defaults to current user)

Implementation Reference

  • The handler function that implements the core logic for the 'yuque_get_repos' tool. It extracts the userId from arguments, calls YuqueClient.getRepos, and formats the response as MCP content.
    async function handleGetRepos(client: YuqueClient, args: { userId?: string }) {
      const repos = await client.getRepos(args.userId);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(repos, null, 2),
          },
        ],
      };
    }
  • The tool schema definition specifying name, description, and inputSchema with optional userId parameter.
    {
      name: 'yuque_get_repos',
      description: '获取知识库列表 (List knowledge repositories)',
      inputSchema: {
        type: 'object',
        properties: {
          userId: {
            type: 'string',
            description: '用户ID,不提供则获取当前用户的知识库 (User ID, defaults to current user)',
          },
        },
      },
    },
  • src/server.ts:46-50 (registration)
    Registration of tool list handlers that returns all tool definitions, including 'yuque_get_repos' schema from YUQUE_TOOLS.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: YUQUE_TOOLS,
      };
    });
  • src/server.ts:52-67 (registration)
    Registration of tool call handler that dispatches to handleTool function, which routes 'yuque_get_repos' to its specific handler.
    // Handle tool execution requests
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      try {
        return await handleTool(request, { client: yuqueClient });
      } catch (error) {
        if (error instanceof McpError) {
          throw error;
        }
    
        const errorMessage = error instanceof Error ? error.message : String(error);
        throw new McpError(
          ErrorCode.InternalError,
          `Error executing tool: ${errorMessage}`
        );
      }
    });
  • Supporting method in YuqueClient that performs the actual API call to fetch repositories for a given user ID (defaults to current user). Called by the tool handler.
    async getRepos(userId?: string): Promise<YuqueRepo[]> {
      // Use /users/{userId}/repos as confirmed working endpoint
      if (!userId) {
        const user = await this.getUser();
        userId = user.id.toString();
      }
      return this.request<YuqueRepo[]>(`/users/${userId}/repos`);
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It states it 'lists' repositories but doesn't describe what information is returned, whether it's paginated, if it requires authentication, rate limits, or any error conditions. For a read operation with zero annotation coverage, 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 is extremely concise with just one bilingual phrase that directly states the tool's purpose. Every word earns its place with zero wasted text, and it's perfectly front-loaded with the core functionality.

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?

For a tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what a 'knowledge repository' contains in this context, what fields are returned, or how the listing is structured. Given the complexity of repository data and lack of structured output information, 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?

Schema description coverage is 100%, so the schema already fully documents the single optional parameter. The description adds no additional parameter information beyond what's in the schema. With high schema coverage, the baseline score of 3 is appropriate since the description doesn't need to compensate but also adds no value.

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 '获取/List' and resource '知识库列表/knowledge repositories', making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'yuque_get_docs' or 'yuque_search_docs' which also retrieve content from the same system, so it doesn't achieve full sibling differentiation.

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. With siblings like 'yuque_get_docs' (gets documents) and 'yuque_search_docs' (searches documents), there's no indication whether this tool is for repository metadata, how it relates to document retrieval, or any prerequisites for use.

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