gemini_code_golf
Simplify Lean code with Google Gemini. Submit your Lean code and get a more concise version.
Instructions
This tool uses the Google Gemini model to simplify Lean code compiled by the compiler.
It uses Google's Gemini API to generate text responses. You need to set the GOOGLE_API_KEY environment variable.
Args:
lean_code (str, optional): The lean code to be golfed.
model (str, optional): The Gemini model to use. The default is "gemini-3-pro-preview".
temperature (float, optional): The generated temperature, controlling randomness. The default is 0.7.
Returns:
str: Gemini model response or error message
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"lean_code": "<lean_code>"
},
"name": "gemini_code_golf"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | gemini-3-pro-preview | |
| lean_code | Yes | ||
| temperature | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |