get_task_notes
Retrieve all notes for a task by providing its name, task ID, series ID, or list ID.
Instructions
Get all notes for a task.
Args: task_name: Task name to search for task_id: Specific task ID taskseries_id: Task series ID list_id: List ID
Returns: List of notes for the task
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_name | No | ||
| task_id | No | ||
| taskseries_id | No | ||
| list_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/rtm_mcp/tools/notes.py:172-247 (handler)The actual handler function for the get_task_notes tool. It takes task_name, task_id, taskseries_id, or list_id to find a task, retrieves its notes from the RTM API, and formats them by id, title, body, created, and modified.
async def get_task_notes( ctx: Context, task_name: str | None = None, task_id: str | None = None, taskseries_id: str | None = None, list_id: str | None = None, ) -> dict[str, Any]: """Get all notes for a task. Args: task_name: Task name to search for task_id: Specific task ID taskseries_id: Task series ID list_id: List ID Returns: List of notes for the task """ from ..client import RTMClient client: RTMClient = await get_client() # Find the task with its notes if task_name and not task_id: result = await client.call("rtm.tasks.getList") tasks = parse_tasks_response(result) name_lower = task_name.lower() task = None for t in tasks: if t["name"].lower() == name_lower or name_lower in t["name"].lower(): task = t break if not task: return build_response(data={"error": f"Task not found: {task_name}"}) else: if not all([task_id, taskseries_id, list_id]): return build_response( data={"error": "Must provide task_name or all three IDs"}, ) # Fetch the specific task result = await client.call("rtm.tasks.getList", list_id=list_id) tasks = parse_tasks_response(result) task = None for t in tasks: if t["id"] == task_id and t["taskseries_id"] == taskseries_id: task = t break if not task: return build_response(data={"error": "Task not found"}) notes = task.get("notes", []) if isinstance(notes, dict): notes = [notes] formatted_notes = [] for note in notes: formatted_notes.append( { "id": note.get("id"), "title": note.get("title", ""), "body": note.get("$t", note.get("body", "")), "created": note.get("created"), "modified": note.get("modified"), } ) return build_response( data={ "task_name": task.get("name"), "notes": formatted_notes, "count": len(formatted_notes), }, ) - src/rtm_mcp/tools/notes.py:172-178 (schema)Input schema for get_task_notes: accepts optional task_name, task_id, taskseries_id, list_id parameters. Returns a dict with task_name, notes list, and count.
async def get_task_notes( ctx: Context, task_name: str | None = None, task_id: str | None = None, taskseries_id: str | None = None, list_id: str | None = None, ) -> dict[str, Any]: - src/rtm_mcp/tools/notes.py:14-15 (registration)The register_note_tools function is the registration mechanism. It calls @mcp.tool() decorator on the get_task_notes function to register it with the FastMCP server.
def register_note_tools(mcp: Any, get_client: Any) -> None: """Register all note-related tools.""" - src/rtm_mcp/server.py:105-106 (registration)Registration invocation: register_note_tools(mcp, get_client) in server.py triggers registration of the get_task_notes tool.
register_note_tools(mcp, get_client) register_utility_tools(mcp, get_client)