Skip to main content
Glama

create_task

Create a new task with a required title and optional project, category, due date, and notes.

Instructions

Create a new task in Amazing Marvin.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesTask title (required)
project_idNoOptional project ID to assign task to
category_idNoOptional category ID for organization
due_dateNoOptional due date in YYYY-MM-DD format
noteNoOptional task notes/description
debugNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
metadataYesMetadata about the data itself
summaryYesHuman-readable insights
debugYes
successYes
api_versionNocurrent
response_versionNo1.0

Implementation Reference

  • The main tool handler for 'create_task'. It is decorated with @mcp.tool(), accepts title (required), project_id, category_id, due_date, note, and debug parameters. It builds task_data dict, calls api_client.create_task(), and returns a StandardResponse via create_simple_response().
    @mcp.tool()
    async def create_task(
        title: str,
        project_id: str | None = None,
        category_id: str | None = None,
        due_date: str | None = None,
        note: str | None = None,
        debug: bool = False,
    ) -> StandardResponse:
        """Create a new task in Amazing Marvin.
    
        Args:
            title: Task title (required)
            project_id: Optional project ID to assign task to
            category_id: Optional category ID for organization
            due_date: Optional due date in YYYY-MM-DD format
            note: Optional task notes/description
    
        For creating multiple tasks, use batch_create_tasks() instead.
        For creating a project with tasks, use create_project_with_tasks().
        """
        start_time = time.time()
        try:
            api_client = create_api_client()
    
            task_data = {"title": title}
            if project_id:
                task_data["parentId"] = project_id
            if category_id:
                task_data["categoryId"] = category_id
            if due_date:
                task_data["dueDate"] = due_date
            if note:
                task_data["note"] = note
    
            created_task = api_client.create_task(task_data)
    
            return create_simple_response(
                data={"created_task": created_task},
                summary_text=f"Created task: {title}",
                api_endpoint="/addTask",
                api_calls_made=1,
                debug=debug,
                start_time=start_time,
            )
        except Exception as e:
            logger.exception("Failed to create task '%s'", title)
            return create_error_response(e, "/addTask", debug, start_time)
  • The tool is registered via the @mcp.tool() decorator on the create_task function. The mcp instance is FastMCP(name='amazing-marvin-mcp') at line 43.
    @mcp.tool()
  • The MarvinAPIClient.create_task() method that actually calls the external API endpoint /addTask via POST request, accepting a task_data dict.
    def create_task(self, task_data: dict) -> dict:
        """Create a new task (uses /addTask endpoint)"""
        return self._make_request("post", "/addTask", data=task_data)
  • create_simple_response() is used by the create_task handler to format the StandardResponse. Also create_error_response() for error cases. Note: create_task_response() is NOT used by create_task (it's for get_tasks).
    def create_simple_response(
        data: Any,
        summary_text: str,
        api_endpoint: str,
        api_calls_made: int = 1,
        debug: bool = False,
        start_time: float | None = None,
    ) -> StandardResponse:
        """Create a simple StandardResponse for non-task data."""
    
        response_time = int((time.time() - start_time) * 1000) if start_time else 0
    
        # Determine count based on data type
        if isinstance(data, list):
            count = len(data)
        elif isinstance(data, dict):
            count = len(data) if data else 0
        else:
            count = 1 if data else 0
    
        return StandardResponse(
            data=data,
            metadata=ResponseMetadata(
                count=count,
                source=api_endpoint.replace("/", "").replace("_", " "),
                data_freshness="real_time",
            ),
            summary=ResponseSummary(
                text=summary_text, status="success", action_completed="data_retrieved"
            ),
            debug=ResponseDebug(
                api_endpoint=api_endpoint,
                response_time_ms=response_time,
                api_calls_made=api_calls_made,
                cache_hit=False,
            )
            if debug
            else None,
            success=True,
            api_version="current",
            response_version="1.0",
        )
Behavior2/5

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

With no annotations, the description carries full burden. It only states the action 'create' without disclosing side effects, error conditions (e.g., duplicate title), or required permissions. It assumes the agent knows the tool creates a single task with specified fields.

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

Conciseness3/5

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

The description is a single sentence that is front-loaded and concise. However, it is excessively brief, omitting useful details like the existence of optional parameters or behavior. It is minimally viable but not well-structured for agent comprehension.

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 tool's 6 parameters and 25 sibling tools, the description does not provide enough context for an agent to use it effectively. It fails to hint at common use cases (e.g., creating a task with due date, category) or differentiate from batch_create_tasks.

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 83%, so most parameters have descriptions in the schema. The description does not add any additional meaning beyond what the schema provides, earning the baseline score of 3.

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 'Create' and the resource 'new task' in Amazing Marvin. It distinguishes from sibling tools like 'batch_create_tasks' which creates multiple tasks, and 'create_project' for projects, though it does not explicitly name them.

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?

No guidance is provided on when to use this tool versus alternatives like batch_create_tasks or create_project. There is no context on prerequisites, such as requiring a project or category to exist before assigning.

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/bgheneti/Amazing-Marvin-MCP'

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