Skip to main content
Glama

add_task

Create a new task with a title and optional description to manage your task list in the Task MCP Server.

Instructions

Add a new task to the task list

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesTask title
descriptionNoTask description (optional)

Implementation Reference

  • Executes the 'add_task' tool by incrementing a task counter, storing the new task in the global 'tasks' dictionary with title and optional description, and returning a confirmation message.
    if name == "add_task":
        task_counter += 1
        title = arguments.get("title", "")
        description = arguments.get("description", "")
        
        tasks[task_counter] = {
            "id": task_counter,
            "title": title,
            "description": description,
            "completed": False
        }
        
        return [
            types.TextContent(
                type="text",
                text=f"✅ Task added successfully!\nID: {task_counter}\nTitle: {title}"
            )
        ]
  • Defines the input schema for 'add_task' tool: requires 'title' string, optional 'description' string.
    inputSchema={
        "type": "object",
        "properties": {
            "title": {
                "type": "string",
                "description": "Task title"
            },
            "description": {
                "type": "string",
                "description": "Task description (optional)"
            }
        },
        "required": ["title"]
    }
  • Registers the 'add_task' tool in the list_tools handler with its name, description, and input schema.
    types.Tool(
        name="add_task",
        description="Add a new task to the task list",
        inputSchema={
            "type": "object",
            "properties": {
                "title": {
                    "type": "string",
                    "description": "Task title"
                },
                "description": {
                    "type": "string",
                    "description": "Task description (optional)"
                }
            },
            "required": ["title"]
        }
    ),
Behavior2/5

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

No annotations are provided, so the description must fully disclose behavioral traits. It states 'Add a new task,' implying a write operation, but lacks details on permissions, side effects (e.g., if it triggers notifications), error handling, or response format. For a mutation tool with zero annotation coverage, this is a significant gap, as it doesn't clarify what happens upon success or failure beyond the basic action.

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, efficient sentence that directly states the tool's purpose without unnecessary words. It's front-loaded with the core action and resource, making it easy to parse. There's no redundancy or fluff, and it fits well within the context of a simple task addition tool, earning a high score for brevity and clarity.

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 write operation with no annotations and no output schema, the description is incomplete. It doesn't explain what the tool returns upon success (e.g., a task ID or confirmation) or failure scenarios, nor does it cover behavioral aspects like idempotency or constraints. For a mutation tool, this leaves critical gaps in understanding how to invoke it effectively and interpret results.

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 schema description coverage is 100%, with clear descriptions for both parameters ('title' and 'description'), so the schema already documents their purposes. The description adds no additional meaning beyond implying these parameters are used for task creation. Since the schema does the heavy lifting, the baseline score of 3 is appropriate, as the description doesn't enhance parameter understanding beyond what's in the structured data.

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 ('Add') and resource ('new task to the task list'), making the purpose immediately understandable. It distinguishes from siblings like 'complete_task' or 'delete_task' by specifying creation rather than modification or deletion. However, it doesn't explicitly differentiate from 'list_tasks' in terms of operation type, though the verb 'Add' implies a write operation versus a read operation.

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, such as needing an existing task list, or compare it to sibling tools like 'list_tasks' for viewing tasks or 'complete_task' for updating them. There's no indication of when not to use it, such as for editing existing tasks, leaving the agent to infer usage from context alone.

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/gvbigdata/MCP-Github-Deployment'

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