Skip to main content
Glama

roam_add_todo

Add multiple todo items to today's Roam daily page as individual actionable blocks, each with todo status, using a list of text strings.

Instructions

Add a list of todo items as individual blocks to today's daily page in Roam. Each item becomes its own actionable block with todo status. NOTE on Roam-flavored markdown: For direct linking: use [[link]] syntax. For aliased linking, use alias syntax. Do not concatenate words in links/hashtags - correct: #[[multiple words]] #self-esteem (for typically hyphenated words). IMPORTANT: Before using this tool, ensure that you have loaded into context the 'Roam Markdown Cheatsheet' resource.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
todosYesList of todo items to add
graphNoTarget graph key from ROAM_GRAPHS config. Defaults to ROAM_DEFAULT_GRAPH. Only needed in multi-graph mode.
write_keyNoWrite confirmation key. Required for write operations on non-default graphs when write_key is configured.

Implementation Reference

  • Core handler for roam_add_todo. Gets or creates today's daily page, maps each todo string to a 'create-block' action with {{[[TODO]]}} prefix, then executes the batch.
    async addTodos(todos: string[]): Promise<{ success: boolean }> {
      if (!Array.isArray(todos) || todos.length === 0) {
        throw new McpError(
          ErrorCode.InvalidRequest,
          'todos must be a non-empty array'
        );
      }
    
      // Get or create today's daily page
      const targetPageUid = await getOrCreateTodayPage(this.graph);
    
      const todo_tag = "{{[[TODO]]}}";
      const actions = todos.map((todo, index) => ({
        action: 'create-block',
        location: {
          'parent-uid': targetPageUid,
          order: index
        },
        block: {
          string: `${todo_tag} ${todo}`
        }
      }));
    
      await executeBatch(this.graph, actions, 'create todo blocks');
      return { success: true };
    }
  • Input schema for roam_add_todo: accepts an array of strings ('todos') plus optional multi-graph params (graph, write_key). 'todos' is required.
    roam_add_todo: {
      name: 'roam_add_todo',
      description: 'Add a list of todo items as individual blocks to today\'s daily page in Roam. Each item becomes its own actionable block with todo status.\nNOTE on Roam-flavored markdown: For direct linking: use [[link]] syntax. For aliased linking, use [alias]([[link]]) syntax. Do not concatenate words in links/hashtags - correct: #[[multiple words]] #self-esteem (for typically hyphenated words).\nIMPORTANT: Before using this tool, ensure that you have loaded into context the \'Roam Markdown Cheatsheet\' resource.',
      inputSchema: {
        type: 'object',
        properties: withMultiGraphParams({
          todos: {
            type: 'array',
            items: {
              type: 'string',
              description: 'Todo item text'
            },
            description: 'List of todo items to add'
          }
        }),
        required: ['todos'],
      },
    },
  • Case handler in the tool dispatch switch statement. Extracts 'todos' from cleanedArgs and delegates to toolHandlers.addTodos().
    case 'roam_add_todo': {
      const { todos } = cleanedArgs as { todos: string[] };
      const result = await toolHandlers.addTodos(todos);
      return {
        content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
      };
    }
  • Delegation method in ToolHandlers class that forwards addTodos calls to this.todoOps.addTodos(todos).
    async addTodos(todos: string[]) {
      return this.todoOps.addTodos(todos);
  • WRITE_OPERATIONS list marks roam_add_todo as a write operation, requiring write confirmation for protected graphs.
    export const WRITE_OPERATIONS = [
      'roam_create_page',
      'roam_create_outline',
      'roam_import_markdown',
      'roam_process_batch_actions',
      'roam_add_todo',
      'roam_remember',
      'roam_create_table',
      'roam_move_block',
      'roam_update_page_markdown',
      'roam_rename_page',
    ] as const;
Behavior3/5

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

The description discloses that each item becomes an actionable block with todo status and provides markdown formatting rules. However, it does not explain behavioral aspects such as irreversibility, required permissions, or effect on existing blocks. Since no annotations exist, more behavioral context would be beneficial.

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 concise: three sentences covering the main function, markdown notes, and a prerequisite. It is well-structured with the key action first, followed by important usage notes. No extraneous information is present.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the essential information for using the tool: what it does, how to format todos, and a prerequisite. However, it omits details on output/return behavior and potential side effects. Given the lack of output schema and annotations, the description could be slightly more comprehensive, but it is largely complete for a focused tool.

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?

With 100% schema description coverage, the input schema already provides clear parameter definitions. The description does not add significant meaning beyond the schema, aside from implicitly associating the 'todos' array with the tool's purpose. Therefore, the description adds minimal extra value for parameter semantics.

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

Purpose5/5

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

The description clearly states the tool's function using a specific verb 'Add' and resource 'list of todo items' to a specific location 'today's daily page'. This distinguishes it from sibling tools that create pages, outlines, or tables, making its purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not provide explicit guidance on when to choose this tool over alternatives. While it implies use for daily journal todos, it lacks exclusions or comparisons to sibling tools like roam_create_outline or roam_update_page_markdown. The prerequisite about the markdown cheatsheet is helpful but does not address usage context.

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/2b3pro/roam-research-mcp'

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