{"openapi":"3.1.0","info":{"title":"Grammarcoach API","version":"0.1.0","description":"A fully local general/adult-audience English grammar reference and practice generator: rule explanations, confusable-word-pair reference, a verified-correct practice-item generator, and a common-errors-by-category reference.\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://grammarcoach.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"hr@unifydynamics.com","url":"https://connectorbay.com/grammarcoach/docs"},"termsOfService":"https://connectorbay.com/grammarcoach/terms"},"servers":[{"url":"https://grammarcoach.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/grammarcoach/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 the rule topics, confusable word pairs, and practice-item topics this connector covers. Use for","description":"Lists the rule topics, confusable word pairs, and practice-item topics this connector covers. Use for\n    \"what grammar topics do you cover\".","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/explain_rule":{"post":{"operationId":"explain_rule","summary":"The full explanation and correct/incorrect examples for one grammar-rule topic. Use for \"explain comma","description":"The full explanation and correct/incorrect examples for one grammar-rule topic. Use for \"explain comma\n    splices\", \"what's the rule for who vs whom\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"topic":{"description":"subject_verb_agreement | comma_splices | dangling_modifiers | who_vs_whom","title":"Topic","type":"string"}},"required":["topic"],"title":"explain_ruleArguments","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/confusable_word_pair":{"post":{"operationId":"confusable_word_pair","summary":"The explanation, memory trick, and real example sentences for one classic confusable word pair. Use for","description":"The explanation, memory trick, and real example sentences for one classic confusable word pair. Use for\n    \"what's the difference between lay and lie\", \"when do I use fewer vs less\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"pair":{"description":"A pair id (e.g. 'lay_vs_lie') or either word in it (e.g. 'lay', 'lie', 'affect', 'its').","examples":["lay_vs_lie","affect_vs_effect","its_vs_its","your_vs_youre","there_their_theyre","then_vs_than","fewer_vs_less","whose_vs_whos"],"title":"Pair","type":"string"}},"required":["pair"],"title":"confusable_word_pairArguments","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/practice_item":{"post":{"operationId":"practice_item","summary":"Generates one or more multiple-choice practice items with a genuinely correct, verified answer and an","description":"Generates one or more multiple-choice practice items with a genuinely correct, verified answer and an\n    explanation. Use for \"give me 5 practice questions on who vs whom\", \"quiz me on subject-verb agreement\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"topic":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"A rule topic or confusable-pair id; omit for a random mix.","title":"Topic"},"count":{"default":1,"maximum":10,"minimum":1,"title":"Count","type":"integer"}},"title":"practice_itemArguments","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/common_errors":{"post":{"operationId":"common_errors","summary":"A wrong-vs-right reference of common grammar errors, organized by category. Use for \"what are common","description":"A wrong-vs-right reference of common grammar errors, organized by category. Use for \"what are common\n    grammar mistakes with pronouns\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"category":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"agreement | punctuation | modifiers | pronoun_case | word_choice; omit for all categories.","title":"Category"}},"title":"common_errorsArguments","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}}}}