Skip to main content
Glama
elizagarate

Things MCP Server

by elizagarate

search_items

Search your Things 3 task manager by query to find specific tasks, projects, or tags.

Instructions

Search for items in Things

Args: query: Search query

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the 'search_items' MCP tool. It takes a query string, builds a Things search URL via url_scheme.search(), executes it, and returns a confirmation message.
    async def search_items(query: str) -> str:
        """Search for items in Things
    
        Args:
            query: Search query
        """
        url = url_scheme.search(query)
        url_scheme.execute_url(url)
        return f"Searching for '{query}'"
  • The @mcp.tool decorator registers search_items as an MCP tool on the FastMCP server instance.
    @mcp.tool
  • The url_scheme.search() helper function constructs the Things URL for searching by calling construct_url('search', {'query': query}).
    def search(query: str) -> str:
        """Construct URL to perform a search."""
        return construct_url('search', {'query': query})
  • The execute_url() helper that runs the Things URL via 'open -g' subprocess, with validation that the URL starts with 'things:///'.
    def execute_url(url: str) -> None:
        """Execute a Things URL without bringing Things to the foreground.
        
        Security: validates the URL starts with 'things:///' before execution
        to prevent opening arbitrary URLs or executing unintended commands.
        Uses subprocess with argument list (no shell interpolation) to avoid
        command injection vectors.
        """
        if not url.startswith("things:///"):
            raise ValueError(f"Invalid Things URL scheme: {url[:50]}")
        subprocess.run(['open', '-g', url], check=True, capture_output=True)
  • The construct_url() helper that builds the full Things URL from a command and parameters dictionary, handling encoding.
    def construct_url(command: str, params: Dict[str, Any]) -> str:
        """Construct a Things URL from command and parameters."""
        # Start with base URL
        url = f"things:///{command}"
    
        # Get authentication token if needed
        if command in ['update', 'update-project']:
            token = things.token()
            if token:
                params['auth-token'] = token
    
        # URL encode parameters
        if params:
            encoded_params = []
            for key, value in params.items():
                if value is None:
                    continue
                # Handle boolean values
                if isinstance(value, bool):
                    value = str(value).lower()
                # Handle lists (for tags, checklist items etc)
                elif isinstance(value, list):
                    value = ','.join(str(v) for v in value)
                encoded_params.append(f"{key}={urllib.parse.quote(str(value))}")
    
            url += "?" + "&".join(encoded_params)
    
        return url
Behavior2/5

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

With no annotations, the description must disclose behavioral traits. It does not indicate whether the search is read-only, the format of results, or any limitations (e.g., no pagination, case sensitivity). The agent cannot infer the tool's side effects or constraints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise at two lines, which is efficient, but the structure is minimal. The 'Args:' section is good, but the overall content is too sparse to be fully useful.

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 presence of multiple sibling search tools and an output schema, the description fails to specify what the tool returns or how it differs. It is incomplete for an agent to decide between search tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description only repeats the parameter name 'query' as 'Search query', adding no additional meaning. There is no detail about query syntax, supported operators, or matching behavior. Since schema coverage is 0%, this is insufficient.

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

Purpose3/5

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

The description states 'Search for items in Things', which is a clear verb and resource, but it does not distinguish from sibling tools like search_todos or search_advanced. The term 'items' is vague and could refer to todos, projects, or other entities, making the purpose somewhat ambiguous.

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?

No guidance is provided on when to use this tool versus alternatives. The description lacks context on which scenarios are appropriate for this search compared to search_todos or search_advanced.

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

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