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"],
        },
    },

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