import { defineTool } from "@grok/agent-sdk/tools"; import { z } from "zod"; const DATA: Record = { "swe-bench-verified": { name: "SWE-bench Verified", tests: "fixing real GitHub issues in Python repositories", task_count: 500 }, "gpqa-diamond": { name: "GPQA Diamond", tests: "graduate-level science multiple-choice questions", task_count: 198 }, }; export default defineTool({ description: "Look up a benchmark by slug (e.g. swe-bench-verified, gpqa-diamond). Returns what it tests and its task count.", inputSchema: z.object({ slug: z.string() }), async execute({ slug }) { const row = DATA[slug.toLowerCase()]; return row ? { found: true, ...row } : { found: false, slug }; }, });