generate_codebase_context
Generate function code using codebase context and coder expert model, optionally co-generating unit tests. Requires English parameters for accurate results.
Instructions
Generate code for a function with codebase context (Template 2) using coder expert model.
If generate_test_file is True, it will co-generate a matching unit test suite.
IMPORTANT: All parameters (such as 'task', 'description', 'constraints', etc.) MUST be provided in English. If the user's prompt or request is in Vietnamese or another language, the calling agent must automatically translate the text of these parameter values into English before invoking this tool.
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": {
"task": "<task>",
"language": "<language>",
"existing_code": "<existing_code>",
"signature": "<signature>",
"description": "<description>",
"test_cases": "<test_cases>"
},
"name": "generate_codebase_context"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task | Yes | ||
| language | Yes | ||
| signature | Yes | ||
| test_cases | Yes | ||
| constraints | No | ||
| description | Yes | ||
| existing_code | Yes | ||
| interacts_with | No | ||
| generate_test_file | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |