peaka_create_query
Create a named, saved SQL query in a Peaka project and get its ID for later execution. Specify project, display name, and Trino SQL body, with optional scheduling for materialized queries.
Instructions
Create a named, saved query in the Peaka project's semantic layer. Returns the created query object including its ID, which can be passed to peaka_execute_query.
If you do not already know the projectId for the current task, call peaka_list_projects first and ask the user which project to use. Remember the chosen projectId for subsequent calls in this conversation.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": {
"projectId": "<projectId>",
"displayName": "<displayName>",
"inputQuery": "<inputQuery>"
},
"name": "peaka_create_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schedule | No | Auto-refresh schedule for MATERIALIZED queries. Use {type: 'interval', repeatDuration}, {type: 'cron', cronExpression, timezone}, or {type: 'none'} to disable an existing schedule. Ignored for PLAIN queries. | |
| projectId | Yes | The Peaka project ID to run against. | |
| queryType | No | PLAIN runs the SQL on each execute; MATERIALIZED stores results. | PLAIN |
| inputQuery | Yes | The Trino SQL body of the query. | |
| displayName | Yes | Human-readable name for the saved query. |