Skip to main content
Glama
small-tou

MCP Test Server

by small-tou

create_todo

Create and manage user-specific tasks by specifying a title and user ID, enabling structured task tracking and organization.

Instructions

创建待办事项

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYes待办事项标题
userIdYes用户ID

Implementation Reference

  • The handler function for the create_todo tool. It destructures title and userId from args, checks if the user exists in testData.users, creates a new todo with incremental ID, appends to testData.todos and logs the action, then returns a success message with the new todo JSON.
    }, async (args) => {
      const { title, userId } = args;
      
      // 检查用户是否存在
      const user = testData.users.find(u => u.id === userId);
      if (!user) {
        return {
          content: [{
            type: "text",
            text: `❌ 错误: 用户ID ${userId} 不存在`
          }]
        };
      }
      
      const newTodo = {
        id: Math.max(...testData.todos.map(t => t.id)) + 1,
        title,
        completed: false,
        userId
      };
      
      testData.todos.push(newTodo);
      testData.logs.push(`创建待办事项: "${title}" (用户: ${user.name})`);
      
      return {
        content: [{
          type: "text",
          text: `✅ 成功创建待办事项: ${JSON.stringify(newTodo, null, 2)}`
        }]
      };
    });
  • Zod input schema defining title as string and userId as number with descriptions.
    title: z.string().describe("待办事项标题"),
    userId: z.number().describe("用户ID")
  • src/index.ts:145-145 (registration)
    The server.tool registration call for create_todo, specifying name, description, schema, and handler.
    server.tool("create_todo", "创建待办事项", {
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. '创建待办事项' implies a write operation (creation), but it doesn't disclose any behavioral traits such as permissions required, whether it's idempotent, error handling, or what happens on success/failure. This is a significant gap for a mutation tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single phrase '创建待办事项', which is highly concise and front-loaded with the core action. It wastes no words, though it could benefit from slightly more context to improve clarity without sacrificing brevity.

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, error conditions, or any behavioral context, making it inadequate for an agent to fully understand how to use this tool effectively.

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 description adds no meaning beyond what the input schema provides. Schema description coverage is 100%, with clear documentation for both parameters ('title' and 'userId'), so the baseline score of 3 is appropriate as the schema handles the parameter semantics adequately without additional value from the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description '创建待办事项' (Create todo) states a clear verb+resource combination, indicating it creates a todo item. However, it doesn't distinguish this tool from potential siblings like 'add_user' or 'calculate' beyond the obvious domain difference, and it lacks specificity about what kind of todo system or context it operates in.

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. There are no explicit instructions on prerequisites, context, or comparisons to sibling tools like 'add_user' or 'search_users', leaving the agent to infer usage based solely on the tool name and parameters.

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

Related 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/small-tou/mcp-test'

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