Skip to main content
Glama

get_inbox_tasks

Retrieve tasks from the OmniFocus inbox perspective, with the option to hide or display completed tasks, to streamline task management and prioritize actionable items.

Instructions

Get tasks from OmniFocus inbox perspective

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hideCompletedNoSet to false to show completed tasks in inbox (default: true)

Implementation Reference

  • MCP tool handler function that validates input, calls the primitive getInboxTasks, and returns the result in MCP content format or error.
    export async function handler(args: z.infer<typeof schema>, extra: RequestHandlerExtra) {
      try {
        const result = await getInboxTasks({
          hideCompleted: args.hideCompleted !== false // Default to true
        });
        
        return {
          content: [{
            type: "text" as const,
            text: result
          }]
        };
      } catch (err: unknown) {
        const errorMessage = err instanceof Error ? err.message : 'Unknown error occurred';
        return {
          content: [{
            type: "text" as const,
            text: `Error getting inbox tasks: ${errorMessage}`
          }],
          isError: true
        };
      }
    }
  • Zod schema defining the input parameters for the get_inbox_tasks tool.
    export const schema = z.object({
      hideCompleted: z.boolean().optional().describe("Set to false to show completed tasks in inbox (default: true)")
    });
  • src/server.ts:99-104 (registration)
    Registration of the 'get_inbox_tasks' tool on the MCP server using server.tool() with name, description, schema, and handler.
    server.tool(
      "get_inbox_tasks",
      "Get tasks from OmniFocus inbox perspective",
      getInboxTasksTool.schema.shape,
      getInboxTasksTool.handler
    );
  • Core helper function implementing the logic to execute OmniFocus script for inbox tasks and format the markdown output.
    export async function getInboxTasks(options: GetInboxTasksOptions = {}): Promise<string> {
      const { hideCompleted = true } = options;
      
      try {
        // Execute the inbox script
        const result = await executeOmniFocusScript('@inboxTasks.js', { 
          hideCompleted: hideCompleted 
        });
        
        if (typeof result === 'string') {
          return result;
        }
        
        // If result is an object, format it
        if (result && typeof result === 'object') {
          const data = result as any;
          
          if (data.error) {
            throw new Error(data.error);
          }
          
          // Format the inbox tasks
          let output = `# INBOX TASKS\n\n`;
          
          if (data.tasks && Array.isArray(data.tasks)) {
            if (data.tasks.length === 0) {
              output += "📪 Inbox is empty - well done!\n";
            } else {
              output += `📥 Found ${data.tasks.length} task${data.tasks.length === 1 ? '' : 's'} in inbox:\n\n`;
              
              data.tasks.forEach((task: any, index: number) => {
                const flagSymbol = task.flagged ? '🚩 ' : '';
                const dueDateStr = task.dueDate ? ` [DUE: ${new Date(task.dueDate).toLocaleDateString()}]` : '';
                const statusStr = task.taskStatus !== 'Available' ? ` (${task.taskStatus})` : '';
                
                output += `${index + 1}. ${flagSymbol}${task.name}${dueDateStr}${statusStr}\n`;
                
                if (task.note && task.note.trim()) {
                  output += `   📝 ${task.note.trim()}\n`;
                }
              });
            }
          } else {
            output += "No inbox data available\n";
          }
          
          return output;
        }
        
        return "Unexpected result format from OmniFocus";
        
      } catch (error) {
        console.error("Error in getInboxTasks:", error);
        throw new Error(`Failed to get inbox tasks: ${error instanceof Error ? error.message : 'Unknown error'}`);
      }
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states what the tool does but doesn't describe important behavioral traits like whether this is a read-only operation, what format the tasks are returned in, if there are rate limits, or authentication requirements. The description is minimal and lacks necessary context for safe use.

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 extremely concise with a single sentence that directly states the tool's purpose. There's no wasted language or unnecessary elaboration, making it efficiently front-loaded and easy to parse.

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 lack of annotations and output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., task details, format, pagination) or provide behavioral context needed for a retrieval operation. For a tool with no structured metadata, this minimal description leaves significant gaps.

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 the single parameter 'hideCompleted' well-documented in the schema. The description doesn't add any parameter-specific information beyond what's already in the schema, so it meets the baseline for adequate but not exceptional coverage.

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 'Get' and the resource 'tasks from OmniFocus inbox perspective', making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_custom_perspective_tasks' or 'get_flagged_tasks', which also retrieve tasks from different perspectives.

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's no mention of when this tool is appropriate compared to other task-retrieval tools like 'get_custom_perspective_tasks' or 'filter_tasks', nor any prerequisites or exclusions.

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/jqlts1/omnifocus-mcp-enhanced'

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