Skip to main content
Glama

search_tasks

Find tasks in Dida365 by searching titles, content, or tags using keywords to locate specific items quickly.

Instructions

搜索任务。可以按标题、内容、标签进行模糊搜索。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes搜索关键词

Implementation Reference

  • The tool handler for "search_tasks" in the server's dispatch function.
    elif name == "search_tasks":
        tasks = client.search_tasks(args["query"])
        if not tasks:
            return "🔍 没有找到包含「%s」的任务。" % args["query"]
        lines = [
            "🔍 搜索「%s」找到 %d 个任务:\n" % (args["query"], len(tasks))
        ]
        for task in tasks:
            lines.append(format_task(task))
            lines.append("")
        return "\n".join(lines)
  • The actual implementation of searching tasks logic in the DidaClient class.
    def search_tasks(self, query: str) -> List[Dict]:
        """搜索任务(按标题和内容模糊匹配)"""
        query_lower = query.lower()
        all_tasks = self.get_all_tasks()
        results: List[Dict] = []
        for task in all_tasks:
            title = task.get("title", "").lower()
            content = task.get("content", "").lower()
            tags = [t.lower() for t in task.get("tags", [])]
            if (
                query_lower in title
                or query_lower in content
                or any(query_lower in tag for tag in tags)
            ):
                results.append(task)
        return results
  • The tool registration/definition for "search_tasks" containing the schema.
    {
        "name": "search_tasks",
        "description": "搜索任务。可以按标题、内容、标签进行模糊搜索。",
        "inputSchema": {
            "type": "object",
            "properties": {
                "query": {"type": "string", "description": "搜索关键词"}
            },
            "required": ["query"],
        },
    },
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 but offers minimal information. It mentions fuzzy search but doesn't describe return format, pagination, error conditions, or performance characteristics. This leaves significant gaps for a search operation that likely returns multiple results.

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

Conciseness4/5

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

The description is appropriately concise with a single sentence that efficiently conveys the core functionality. It's front-loaded with the main purpose and includes relevant details without unnecessary elaboration, though it could be slightly more structured for clarity.

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?

For a search tool with no annotations and no output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., list of tasks, count only), how results are formatted, or any limitations (e.g., search scope, performance). Given the complexity of search operations and lack of structured data, more context is needed.

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 description adds some context by mentioning what fields are searchable (title, content, tags) and that it's a fuzzy search, which provides meaning beyond the schema's simple 'search keyword' parameter description. However, with 100% schema description coverage, the baseline is 3, and this additional information doesn't substantially enhance parameter understanding.

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 tool's purpose as searching tasks with specific searchable fields (title, content, tags) and mentions fuzzy matching. It distinguishes from siblings like 'get_all_tasks' by specifying search functionality, though it doesn't explicitly contrast with 'get_tasks_by_priority' or 'get_overdue_tasks' which have different filtering approaches.

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. It doesn't mention when to prefer this search over sibling tools like 'get_all_tasks' for comprehensive listing or 'get_tasks_by_priority' for priority-based filtering, nor does it specify any prerequisites or exclusions for usage.

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/Martinqi826/dida-mcp'

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