{"openapi":"3.1.0","info":{"title":"Math Drill API","version":"0.1.0","description":"An arithmetic/algebra/geometry/trig drill generator for grades 7-12 and adult refreshers, with every answer genuinely computed and worked step-by-step solutions for algebra.\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://mathdrill.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"hr@unifydynamics.com","url":"https://connectorbay.com/mathdrill/docs"},"termsOfService":"https://connectorbay.com/mathdrill/terms"},"servers":[{"url":"https://mathdrill.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/mathdrill/docs"},"security":[{},{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_topics":{"post":{"operationId":"list_topics","summary":"Lists every topic and subtopic Math Drill can generate, and which grade bands offer which topics.","description":"Lists every topic and subtopic Math Drill can generate, and which grade bands offer which topics.","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_topicsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/grade_band_info":{"post":{"operationId":"grade_band_info","summary":"Describes what's covered at a grade band: which topics and subtopics. Use for \"what math does a 9th grader","description":"Describes what's covered at a grade band: which topics and subtopics. Use for \"what math does a 9th grader\n    practice\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"grade_band":{"default":"9-10","description":"7-8 | 9-10 | 11-12 | adult","title":"Grade Band","type":"string"}},"title":"grade_band_infoArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/generate_problems":{"post":{"operationId":"generate_problems","summary":"Generates math practice problems with answers included for self-checking, filtered by grade band and","description":"Generates math practice problems with answers included for self-checking, filtered by grade band and\n    optionally topic/subtopic. Every answer is computed from the problem's own random inputs. Use for \"give me 10\n    algebra I problems for a 9th grader\", \"quadratic equation practice\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"grade_band":{"default":"9-10","description":"7-8 | 9-10 | 11-12 | adult","title":"Grade Band","type":"string"},"topic":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"pre_algebra | algebra1 | geometry | algebra2 | trig","title":"Topic"},"subtopic":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"A specific subtopic (see list_topics); overrides topic.","title":"Subtopic"},"count":{"default":10,"maximum":25,"minimum":1,"title":"Count","type":"integer"},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Fixed seed for reproducible problems.","title":"Seed"}},"title":"generate_problemsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/worked_solution":{"post":{"operationId":"worked_solution","summary":"Gives a full step-by-step solution for a problem, re-derived from its raw `params` (works for the algebra","description":"Gives a full step-by-step solution for a problem, re-derived from its raw `params` (works for the algebra\n    subtopics, which have multi-step solving; others don't have a step breakdown). Use for \"show me how to solve\n    this step by step\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"topic":{"description":"Topic from a generated problem, e.g. algebra1.","title":"Topic","type":"string"},"subtopic":{"description":"Subtopic from a generated problem.","title":"Subtopic","type":"string"},"params":{"additionalProperties":true,"description":"The `params` field from a problem returned by generate_problems.","title":"Params","type":"object"}},"required":["topic","subtopic","params"],"title":"worked_solutionArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/check_answer":{"post":{"operationId":"check_answer","summary":"Checks a student's answer against the correct answer, recomputed independently from the problem's raw","description":"Checks a student's answer against the correct answer, recomputed independently from the problem's raw\n    `params`. Use for \"is 42 the right answer to this problem\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"topic":{"description":"Topic from a generated problem.","title":"Topic","type":"string"},"subtopic":{"description":"Subtopic from a generated problem.","title":"Subtopic","type":"string"},"params":{"additionalProperties":true,"description":"The `params` field from a problem returned by generate_problems.","title":"Params","type":"object"},"student_answer":{"description":"The answer to check, as text.","title":"Student Answer","type":"string"}},"required":["topic","subtopic","params","student_answer"],"title":"check_answerArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/formula_reference":{"post":{"operationId":"formula_reference","summary":"A lookup of geometry, algebra, and trig formulas (area/perimeter/volume, slope, quadratic formula, exponent","description":"A lookup of geometry, algebra, and trig formulas (area/perimeter/volume, slope, quadratic formula, exponent\n    rules, SOH-CAH-TOA, degree/radian conversion, special-angle values). Use for \"what's the quadratic formula\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"topic":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"geometry | algebra | trig; omit for all.","title":"Topic"}},"title":"formula_referenceArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/solve_linear_equation":{"post":{"operationId":"solve_linear_equation","summary":"Solves ax + b = cx + d for x, with full steps, for any coefficients you supply. Use for \"how do I solve","description":"Solves ax + b = cx + d for x, with full steps, for any coefficients you supply. Use for \"how do I solve\n    2x + 3 = 5x + 11\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"a":{"description":"Coefficient of x on the left.","title":"A","type":"number"},"b":{"description":"Constant on the left.","title":"B","type":"number"},"c":{"description":"Coefficient of x on the right.","title":"C","type":"number"},"d":{"description":"Constant on the right.","title":"D","type":"number"}},"required":["a","b","c","d"],"title":"solve_linear_equationArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/solve_quadratic":{"post":{"operationId":"solve_quadratic","summary":"Solves ax^2 + bx + c = 0 via the quadratic formula, showing the discriminant and full steps, for any","description":"Solves ax^2 + bx + c = 0 via the quadratic formula, showing the discriminant and full steps, for any\n    coefficients you supply (including ones with no real solution). Use for \"solve x^2 - 5x + 6 = 0\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"a":{"description":"Coefficient of x^2 (nonzero).","title":"A","type":"number"},"b":{"description":"Coefficient of x.","title":"B","type":"number"},"c":{"description":"Constant term.","title":"C","type":"number"}},"required":["a","b","c"],"title":"solve_quadraticArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}