Skip to main content
Glama

things_get_upcoming

Retrieve scheduled to-dos with dates from Things 3 to view upcoming tasks and deadlines. Limit results by specifying maximum number of items to return.

Instructions

Get all scheduled to-dos (with dates)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_resultsNoLimit number of results returned (defaults to all if not specified)

Implementation Reference

  • GetToolHandler handles the execution of 'things_get_upcoming' via the execute() method, delegating the actual work to an AppleScript file named 'get-upcoming'.
    class GetToolHandler extends AbstractToolHandler<GetParams> {
      protected definitions: ToolDefinition<GetParams>[] = [
        {
          name: 'things_get_inbox',
          description: 'Get all to-dos in the Inbox',
          schema: GetListSchema
        },
        {
          name: 'things_get_today',
          description: 'Get all to-dos scheduled for Today',
          schema: GetListSchema
        },
        {
          name: 'things_get_upcoming',
          description: 'Get all scheduled to-dos (with dates)',
          schema: GetListSchema
        },
        {
          name: 'things_get_anytime',
          description: 'Get all to-dos in Anytime',
          schema: GetListSchema
        },
        {
          name: 'things_get_someday',
          description: 'Get all to-dos in Someday',
          schema: GetListSchema
        },
        {
          name: 'things_get_logbook',
          description: 'Get all completed to-dos in the Logbook',
          schema: GetListSchema
        },
        {
          name: 'things_get_trash',
          description: 'Get all deleted to-dos in the Trash',
          schema: GetListSchema
        },
        {
          name: 'things_get_projects',
          description: 'Get all active projects',
          schema: GetListSchema
        },
        {
          name: 'things_get_areas',
          description: 'Get all areas',
          schema: GetListSchema
        },
        {
          name: 'things_get_tags',
          description: 'Get all tags',
          schema: GetListSchema
        },
        {
          name: 'things_get_project',
          description: 'Get all to-dos in a specific project',
          schema: GetProjectSchema
        },
        {
          name: 'things_get_area',
          description: 'Get all items in a specific area',
          schema: GetAreaSchema
        },
        {
          name: 'things_get_list',
          description: 'Get all to-dos from a specific list by name',
          schema: GetListByNameSchema
        },
        {
          name: 'things_get_todo_details',
          description: 'Get detailed information about a specific to-do including deadline, notes, status, etc.',
          schema: GetTodoDetailsSchema
        }
      ];
    
      private scriptMap: Record<string, string> = {
        'things_get_inbox': 'get-inbox',
        'things_get_today': 'get-today',
        'things_get_upcoming': 'get-upcoming',
        'things_get_anytime': 'get-anytime',
        'things_get_someday': 'get-someday',
        'things_get_logbook': 'get-logbook',
        'things_get_trash': 'get-trash',
        'things_get_projects': 'get-projects',
        'things_get_areas': 'get-areas',
        'things_get_tags': 'get-tags',
        'things_get_project': 'get-project-todos',
        'things_get_area': 'get-area-items',
        'things_get_todo_details': 'get-todo-details'
      };
    
      private listNameToScript: Record<string, string> = {
        'inbox': 'get-inbox',
        'today': 'get-today',
        'upcoming': 'get-upcoming',
        'anytime': 'get-anytime',
        'someday': 'get-someday',
        'logbook': 'get-logbook',
        'trash': 'get-trash'
      };
    
      async execute(toolName: string, params: GetParams): Promise<string> {
        let scriptName: string;
        
        // Handle the get_list tool separately
        if (toolName === 'things_get_list') {
          const listParams = params as z.infer<typeof GetListByNameSchema>;
          scriptName = this.listNameToScript[listParams.list];
          if (!scriptName) {
            throw new Error(`Unknown list: ${listParams.list}`);
          }
        } else {
          scriptName = this.scriptMap[toolName];
          if (!scriptName) {
            throw new Error(`Unknown tool: ${toolName}`);
          }
        }
        
        let scriptArgs: string[] = [];
        const options = { maxResults: (params as any).max_results };
        
        // Handle specific tools that need arguments
        if (toolName === 'things_get_project') {
          const projectParams = params as z.infer<typeof GetProjectSchema>;
          scriptArgs = [projectParams.project_id];
        } else if (toolName === 'things_get_area') {
          const areaParams = params as z.infer<typeof GetAreaSchema>;
          scriptArgs = [areaParams.area_id];
        } else if (toolName === 'things_get_todo_details') {
          const todoParams = params as z.infer<typeof GetTodoDetailsSchema>;
          scriptArgs = [todoParams.id];
          // Don't pass maxResults for todo details since it's a single item
          delete options.maxResults;
        }
        
        const output = await executeAppleScriptFile(scriptName, scriptArgs, options);
        
        // Return empty array for empty output
        if (!output.trim()) {
          const emptyResult = toolName.includes('project') || toolName.includes('area') 
            ? { todos: [] }
            : { [this.getResultKey(toolName)]: [] };
          return JSON.stringify(emptyResult, null, 2);
        }
        
        // Parse based on tool type
        let result;
        switch (toolName) {
          case 'things_get_projects':
            result = { projects: parseProjectList(output) };
            break;
          case 'things_get_areas':
            result = { areas: parseAreaList(output) };
            break;
          case 'things_get_tags':
            result = { tags: parseTagList(output) };
            break;
          case 'things_get_todo_details':
            result = parseTodoDetails(output);
            break;
          default:
            result = { todos: parseTodoList(output) };
        }
        
        return JSON.stringify(result, null, 2);
      }
    
      private getResultKey(toolName: string): string {
        if (toolName.includes('project')) return 'projects';
        if (toolName.includes('area')) return 'areas';
        if (toolName.includes('tag')) return 'tags';
        return 'todos';
      }
    }
  • src/tools/get.ts:22-25 (registration)
    'things_get_upcoming' tool definition including name, description, and schema.
      name: 'things_get_upcoming',
      description: 'Get all scheduled to-dos (with dates)',
      schema: GetListSchema
    },
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. While 'Get' implies a read-only operation, the description fails to define the temporal scope of 'upcoming' (e.g., includes today? next 7 days? all future?), mention pagination behavior, or describe the return format. Critical behavioral traits remain undocumented.

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 where every word serves a purpose. It is front-loaded with the action verb, specifies the resource, and includes the distinguishing characteristic '(with dates)' without verbosity.

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

Completeness3/5

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

For a simple list-retrieval tool with one optional parameter and no output schema, the description is minimally adequate. However, given the rich ecosystem of sibling tools with overlapping concerns (various temporal views), the description should clarify the specific time window of 'upcoming' to ensure correct agent selection.

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 input schema has 100% description coverage for the max_results parameter. The description adds no explicit parameter guidance, but given the high schema coverage, it meets the baseline expectation. The description implies filtering/limiting capability through 'Get all' which aligns with the optional max_results parameter.

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 uses a specific verb ('Get') and resource ('scheduled to-dos'), and the parenthetical '(with dates)' provides implicit differentiation from sibling tools like things_get_anytime or things_get_someday. However, it does not explicitly clarify what time range constitutes 'upcoming' versus things_get_today.

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. Given the numerous sibling list-retrieval tools (things_get_today, things_get_anytime, things_get_someday, things_get_inbox), the absence of selection criteria forces the agent to guess which tool is appropriate for a given temporal query.

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/hildersantos/things-mcp'

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