search for standard sites pub-search.waow.tech
search zig blog atproto

fix: reduce MCP context rot in get_tags and get_stats

- add limit param to get_tags (default 10, was returning all ~100 tags)
- strip timing data from get_stats (36 latency numbers most callers
don't need — use the dashboard for that)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

+8 -3
+8 -3
mcp/src/pub_search/server.py
··· 303 303 304 304 305 305 @mcp.tool 306 - async def get_tags() -> list[Tag]: 306 + async def get_tags(limit: int = 10) -> list[Tag]: 307 307 """list all available tags with document counts. 308 308 309 309 returns tags sorted by document count (most popular first). 310 310 useful for discovering topics and filtering searches. 311 + 312 + args: 313 + limit: max tags to return (default 10) 311 314 312 315 returns: 313 316 list of tags with their document counts ··· 318 321 data = response.json() 319 322 320 323 results = _extract_results(data) 321 - return [Tag(**t) for t in results] 324 + return [Tag(**t) for t in results[:limit]] 322 325 323 326 324 327 @mcp.tool ··· 331 334 async with get_http_client() as client: 332 335 response = await client.get("/stats") 333 336 response.raise_for_status() 334 - return Stats(**response.json()) 337 + data = response.json() 338 + data.pop("timing", None) 339 + return Stats(**data) 335 340 336 341 337 342 @mcp.tool