Skip to main content
Glama

yuque_create_repo

Create a knowledge repository on the Yuque platform by specifying name, description, and visibility settings to organize and manage documentation.

Instructions

创建知识库 (Create knowledge repository)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes知识库名称 (Repository name)
descriptionNo知识库描述,可选 (Repository description, optional)
isPublicNo是否公开,默认false (Whether public, default false)

Implementation Reference

  • The handler function that executes the yuque_create_repo tool logic, calling YuqueClient.createRepo and returning the result as JSON content.
    async function handleCreateRepo(
      client: YuqueClient,
      args: {
        name: string;
        description?: string;
        isPublic?: boolean;
      }
    ) {
      const repo = await client.createRepo(
        args.name,
        args.description,
        args.isPublic || false
      );
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(repo, null, 2),
          },
        ],
      };
    }
  • The schema definition for the yuque_create_repo tool, including input parameters validation and description.
    {
      name: 'yuque_create_repo',
      description: '创建知识库 (Create knowledge repository)',
      inputSchema: {
        type: 'object',
        properties: {
          name: {
            type: 'string',
            description: '知识库名称 (Repository name)',
            minLength: 1,
            maxLength: 100,
          },
          description: {
            type: 'string',
            description: '知识库描述,可选 (Repository description, optional)',
            maxLength: 500,
          },
          isPublic: {
            type: 'boolean',
            description: '是否公开,默认false (Whether public, default false)',
          },
        },
        required: ['name'],
      },
    },
  • src/server.ts:46-50 (registration)
    Tool registration point where all YUQUE_TOOLS (including yuque_create_repo) are provided to the MCP server via ListToolsRequestHandler.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: YUQUE_TOOLS,
      };
    });
  • Supporting utility in YuqueClient that performs the actual API call to create a repository, used by the tool handler.
    async createRepo(
      name: string,
      description?: string,
      isPublic: boolean = false
    ): Promise<YuqueRepo> {
      const slug = this.generateSlug(name);
    
      // Get current user ID for repository creation
      const user = await this.getUser();
      const userId = user.id;
    
      return this.request<YuqueRepo>(`/users/${userId}/repos`, {
        method: 'POST',
        data: {
          name,
          slug,
          description: description || '',
          public: isPublic ? 1 : 0,
          type: 'Book',
        },
      });
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool creates a repository, implying a write/mutation operation, but doesn't cover critical aspects like authentication requirements, rate limits, error conditions, or what happens on success (e.g., returns a repository ID). This leaves significant gaps for a creation tool.

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 ('创建知识库 (Create knowledge repository)'), front-loading the core purpose without any wasted words. Every part of the description earns its place by clearly stating the tool's function.

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 complexity of a creation tool with no annotations and no output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., repository object or ID), authentication needs, or error handling, which are essential for an agent to use this tool effectively in context with its siblings.

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%, with all parameters clearly documented in the schema (name, description, isPublic). The description adds no additional parameter semantics beyond what's in the schema, so it meets the baseline of 3 for adequate coverage without extra 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 action ('创建知识库'/'Create knowledge repository') and resource ('知识库'/'knowledge repository'), making the purpose immediately understandable. It distinguishes this from sibling tools like yuque_get_repos (read) and yuque_create_doc (document creation), though it doesn't explicitly mention these distinctions in the description text itself.

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 (e.g., authentication needs), when not to use it, or how it differs from related tools like yuque_get_repos or yuque_create_doc, leaving the agent without contextual usage instructions.

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