generate_context
Generate a clearskies context configuration that wraps an endpoint, with optional DI classes, modules, and bindings.
Instructions
Generate a clearskies context configuration that wraps an endpoint.
Args:
context_type: The context type (e.g. "Cli", "WsgiRef", "Wsgi").
endpoint_code: The endpoint expression to wrap (e.g. output from generate_endpoint).
classes: List of model class names to register with DI.
modules: List of module names to register with DI.
bindings: Dictionary of name → value DI bindings.
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": {
"context_type": "<context_type>",
"endpoint_code": "<endpoint_code>"
},
"name": "generate_context"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| classes | No | ||
| modules | No | ||
| bindings | No | ||
| context_type | Yes | ||
| endpoint_code | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |