Skip to main content
Glama

search-todos

Search for todos in Things 3 using natural language queries to find specific tasks and manage your workflow efficiently.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch term
detailNoResponse detail level. Defaults to compact.
limitNoMaximum number of todos to return

Implementation Reference

  • The implementation of the 'search-todos' tool. It filters tasks from the database based on the provided query string.
    server.tool(
      "search-todos",
      {
        query: z.string().describe("Search term"),
        detail: z.enum(["compact", "full"]).optional().describe("Response detail level. Defaults to compact."),
        limit: z.number().int().positive().optional().describe("Maximum number of todos to return"),
      },
      async ({ query, detail, limit }) => {
        const requestedDetail = detail ?? "compact";
        const lower = query.toLowerCase();
        const todos = await withDatabase((db) =>
          applyLimit(
            getAllTasks(db).filter(
              (task) => task.type === "to-do" && !task.trashed && matchesQuery(task, lower)
            ),
            limit
          ).map((task) => toTaskView(task, requestedDetail))
        );
        return buildTextResponse(`Found ${todos.length} matching todos`, {
          todos,
          detail: requestedDetail,
          limit: limit ?? null,
        });
      }
    );

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/soycanopa/SupaThings-MCP'

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