search_augments
Find Teamfight Tactics augments by searching name or description. Use this tool to access accurate game data and prevent AI hallucinations about TFT mechanics.
Instructions
Search TFT augments by name or description. Omit the query to list all augments in the current set.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Free-text search across augment name and description (uses FTS5) | |
| limit | No | Max results to return, 1-50 (default: 20) |
Implementation Reference
- src/tools/search-augments.ts:36-76 (handler)The implementation of the `searchAugments` tool logic, which queries the SQLite database based on the provided search query.
export function searchAugments( db: Database.Database, input: SearchAugmentsInputType, ): SearchAugmentsResult { const limit = input.limit ?? 20; let sql: string; const params: unknown[] = []; if (input.query) { params.push(input.query, limit); sql = ` SELECT a.name, a.description FROM augments_fts fts JOIN augments a ON a.rowid = fts.rowid WHERE augments_fts MATCH ? ORDER BY fts.rank LIMIT ? `; } else { params.push(limit); sql = ` SELECT name, description FROM augments ORDER BY name LIMIT ? `; } const rows = db.prepare(sql).all(...params) as Array<{ name: string; description: string | null; }>; const augments: AugmentSummary[] = rows.map((row) => ({ name: row.name, description: row.description ?? '', })); return { augments, total: augments.length }; } - src/tools/search-augments.ts:6-18 (schema)Input schema for the search_augments tool.
export const SearchAugmentsInput = z.object({ query: z .string() .optional() .describe('Free-text search across augment name and description (uses FTS5)'), limit: z .number() .min(1) .max(50) .optional() .default(20) .describe('Max results to return, 1-50 (default: 20)'), }); - src/server.ts:167-177 (registration)Registration of the search_augments tool in the server.
// 7. search_augments server.tool( 'search_augments', 'Search TFT augments by name or description. Omit the query to list all augments in the current set.', SearchAugmentsInput.shape, async (params) => { try { const result = searchAugments(db, params); return { content: [{ type: 'text' as const, text: formatSearchAugments(result) }], };