Skip to main content
Glama
peakacom

peaka-mcp-server

Official
by peakacom

peaka_create_query

Create a named, saved query in a project's semantic layer and return its ID for later execution. Specify the project, display name, SQL body, and optional schedule or materialization.

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scheduleNoAuto-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.
projectIdYesThe Peaka project ID to run against.
queryTypeNoPLAIN runs the SQL on each execute; MATERIALIZED stores results.PLAIN
inputQueryYesThe Trino SQL body of the query.
displayNameYesHuman-readable name for the saved query.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.11.0

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate this is a write operation (readOnlyHint false) and not destructive (destructiveHint false). The description adds useful context by disclosing the immediate outcome—creation of a saved query and return of its ID—and by noting the project selection prerequisite. It does not discuss permissions or duplicate-name behavior, but those are not critical gaps given the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded: purpose first, return value second, prerequisite workflow last. Every sentence carries useful information, and there is no filler or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is adequate for this tool's complexity: five parameters are fully covered by the schema, and the description explains the return value and the project-selection workflow. Since there is no output schema, more detail about the full created query object's fields would be slightly helpful, but the key information an agent needs to call and use the tool is present.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all five parameters. The description adds meaningful value beyond the schema by explaining how to obtain and remember projectId when unknown, and by clarifying that the returned ID is intended for peaka_execute_query. This is above the baseline for fully documented schemas.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb ('Create'), a specific resource ('named, saved query'), and a specific location ('Peaka project's semantic layer'). It also states the return value (query object with ID), distinguishing this create operation from the many execute, get, update, and delete siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear, actionable context: if the projectId is unknown, call peaka_list_projects first and ask the user which project to use, then remember it for later calls. It also notes the returned ID can be passed to peaka_execute_query, but it does not explicitly contrast this tool with alternative creation or retrieval approaches, so it falls short of a full when/when-not statement.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/peakacom/peaka-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server