Skip to main content
Glama

things_get_trash

Retrieve deleted to-dos from the Trash in Things 3, with optional result limits for efficient task recovery.

Instructions

Get all deleted to-dos in the Trash

Input Schema

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

Implementation Reference

  • The 'execute' method of GetToolHandler dispatches the 'things_get_trash' tool to the 'get-trash' AppleScript. The output is then parsed using 'parseTodoList'.
    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);
    }
  • src/tools/get.ts:42-45 (registration)
    Registration of the 'things_get_trash' tool within the 'GetToolHandler' definitions.
      name: 'things_get_trash',
      description: 'Get all deleted to-dos in the Trash',
      schema: GetListSchema
    },
Behavior3/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 specifies the 'deleted' state of the to-dos, but fails to indicate whether this is a read-only operation (presumed but not stated), what data structure is returned, or whether trashed items include metadata like deletion dates. It meets minimum disclosure by defining the trashed status.

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 with zero waste. The most critical information (action and scope) is front-loaded, making it immediately scannable. No restructuring or trimming is needed.

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 retrieval tool with one optional parameter and 100% schema coverage, the description is minimally adequate. However, given the absence of an output schema and annotations, the description could be improved by mentioning the return type (list of to-dos) or confirming the read-only nature of the operation. As written, it covers the essentials but leaves gaps in contextual richness.

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 mentions 'all' to-dos, which aligns with the parameter's default behavior, but adds no additional semantic context (e.g., performance implications of large result sets, pagination behavior). Baseline 3 is appropriate given the schema already fully documents the 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 clearly identifies the resource ('deleted to-dos in the Trash') and action ('Get'), effectively distinguishing this from sibling list tools like things_get_inbox or things_get_logbook by specifying the Trash scope. However, it uses the generic verb 'Get' rather than 'List' or 'Retrieve', and does not explicitly contrast with similar archival states (e.g., completed vs. deleted).

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 explicit guidance on when to use this tool versus alternatives (e.g., when to check Trash vs. Logbook for completed items). While 'Trash' implies a specific use case, there is no 'when to use' or 'when not to use' instruction to help the agent decide between the many available list-retrieval siblings.

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