Skip to main content
Glama

tracker_search

Search across projects, epics, tasks, and notes by keyword to find relevant information in your project tracker database.

Instructions

Search across ALL entities (projects, epics, tasks, notes) by keyword. Returns categorized results.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch keywords
entity_typesNoLimit search to specific entity types (omit for all)
limitNoMax results per entity type

Implementation Reference

  • The handler function 'handleSearch' performs the database queries for the 'tracker_search' tool.
    function handleSearch(args: Record<string, unknown>) {
      const db = getDb();
      const query = args.query as string;
      const entityTypes = (args.entity_types as string[] | undefined) ?? ['project', 'epic', 'task', 'note'];
      const limit = (args.limit as number) ?? 20;
      const pattern = `%${query}%`;
    
      const results: Record<string, unknown[]> = {};
    
      if (entityTypes.includes('project')) {
        results.projects = db
          .prepare('SELECT * FROM projects WHERE name LIKE ? OR description LIKE ? LIMIT ?')
          .all(pattern, pattern, limit);
      }
    
      if (entityTypes.includes('epic')) {
        results.epics = db
          .prepare(
            `SELECT e.*, p.name as project_name
             FROM epics e
             JOIN projects p ON p.id = e.project_id
             WHERE e.name LIKE ? OR e.description LIKE ?
             LIMIT ?`
          )
          .all(pattern, pattern, limit);
      }
    
      if (entityTypes.includes('task')) {
        results.tasks = db
          .prepare(
            `SELECT t.*, e.name as epic_name
             FROM tasks t
             JOIN epics e ON e.id = t.epic_id
             WHERE t.title LIKE ? OR t.description LIKE ?
             LIMIT ?`
          )
          .all(pattern, pattern, limit);
      }
    
      if (entityTypes.includes('note')) {
        results.notes = db
          .prepare('SELECT * FROM notes WHERE title LIKE ? OR content LIKE ? LIMIT ?')
          .all(pattern, pattern, limit);
      }
    
      return results;
    }
  • The definition and input schema for the 'tracker_search' tool.
    {
      name: 'tracker_search',
      description:
        'Search across ALL entities (projects, epics, tasks, notes) by keyword. Returns categorized results.',
      annotations: { title: 'Global Search', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
      inputSchema: {
        type: 'object',
        properties: {
          query: { type: 'string', description: 'Search keywords' },
          entity_types: {
            type: 'array',
            items: { type: 'string', enum: ['project', 'epic', 'task', 'note'] },
            description: 'Limit search to specific entity types (omit for all)',
          },
          limit: { type: 'integer', default: 20, description: 'Max results per entity type' },
        },
        required: ['query'],
      },
    },
  • Mapping of the 'tracker_search' tool name to its handler function.
    export const handlers: Record<string, ToolHandler> = {
      tracker_search: handleSearch,
    };

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/spranab/saga-mcp'

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