Skip to main content
Glama
peaka-mcp-server

peaka-mcp-server

Official
by peakacom

peaka_create_cache

Creates a cache for an uncached SaaS table so its records are read from Peaka instead of the source; optionally sets full or incremental refresh schedules.

Instructions

Create a cache for a table in the Peaka project, so its records are read from Peaka instead of the source. Only for tables of a SaaS source that are not cached yet (peaka_list_project_tables: a SaaS schema's table without [cached]; peaka_list_tables: not_cached): a live read of them may return only the first page of records. A database table (e.g. Oracle) is read live and in full and is not cached. Create a cache only when the user asks for it or agrees to it, never to work around a failing or slow query; the first sync takes time, and until it completes the cache is not complete. Schedule expressions are optional at creation time and use ISO-8601 durations (e.g. PT6H, P1D, P7D, P30D); they can be set later with peaka_update_cache.

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>",
      "catalogId": "<catalogId>",
      "schemaName": "<schemaName>",
      "tableName": "<tableName>"
    },
    "name": "peaka_create_cache"
  }
}

Input Schema

NameRequiredDescriptionDefault
catalogIdYesThe catalog's id, or its name as written in SQL (e.g. "stripe" in stripe.payment.charges). "peaka" with schemaName query or mtquery is the saved queries, with any other schema the Peaka tables.
projectIdYesThe Peaka project ID to run against.
tableNameYes
schemaNameYes
fullRefreshScheduleNoOptional full refresh schedule. {type: 'BASIC', expression: 'P7D'} for recurring, or {type: 'NONE'} to leave it off. Omit to leave unset.
incrementalScheduleNoOptional incremental refresh schedule. {type: 'BASIC', expression: 'PT6H'} for recurring, or {type: 'NONE'} to leave it off. Omit to leave unset.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.15.5
    • addedInput schema / properties / catalogId / description
      Added value: +"The catalog's id, or its name as written in SQL (e.g. \"stripe\" in stripe.payment.charges). \"peaka\" with schemaName query or mtquery is the saved queries, with any other schema the Peaka tables."
  2. Changed2 schema fields changedv0.15.1
    • removedInput schema / properties / fullRefreshSchedule / $ref
      Removed value: -"#/properties/incrementalSchedule"
    • addedInput schema / properties / fullRefreshSchedule / anyOf
      Added value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "expression": {
      +        "description": "ISO-8601 duration between refreshes, e.g. PT6H, P1D, P7D, P30D.",
      +        "pattern": "^P(?!$)(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+S)?)?$",
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "BASIC",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "expression"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "type": {
      +        "const": "NONE",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type"
      +    ],
      +    "type": "object"
      +  }
      +]
  3. Changed6 schema fields changedv0.12.2
    • addedInput schema / properties / fullRefreshSchedule / $ref
      Added value: +"#/properties/incrementalSchedule"
    • changedInput schema / properties / fullRefreshSchedule / description
      Previous value: -"Optional ISO-8601 duration for the full refresh schedule, e.g. P7D, P30D."New value: +"Optional full refresh schedule. {type: 'BASIC', expression: 'P7D'} for recurring, or {type: 'NONE'} to leave it off. Omit to leave unset."
    • removedInput schema / properties / fullRefreshSchedule / type
      Removed value: -"string"
    • addedInput schema / properties / incrementalSchedule / anyOf
      Added value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "expression": {
      +        "description": "ISO-8601 duration between refreshes, e.g. PT6H, P1D, P7D, P30D.",
      +        "pattern": "^P(?!$)(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+S)?)?$",
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "BASIC",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "expression"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "type": {
      +        "const": "NONE",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type"
      +    ],
      +    "type": "object"
      +  }
      +]
    • changedInput schema / properties / incrementalSchedule / description
      Previous value: -"Optional ISO-8601 duration for the incremental refresh schedule, e.g. PT6H, P1D."New value: +"Optional incremental refresh schedule. {type: 'BASIC', expression: 'PT6H'} for recurring, or {type: 'NONE'} to leave it off. Omit to leave unset."
    • removedInput schema / properties / incrementalSchedule / type
      Removed value: -"string"
  4. First observedv0.11.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and openWorldHint=false, and the description adds behavior the annotations cannot convey: the first sync takes time and the cache is incomplete until it finishes, and live reads of uncached SaaS tables may return only the first page. It also discloses the user-consent prerequisite, which is operational context beyond the structured fields.

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

Conciseness4/5

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

The core constraint and preconditions are front-loaded in the first paragraph, with scheduling and projectId guidance in following paragraphs, so an agent reading only the opening sentence still gets the gating rule. Some length is due to genuinely dense conditional guidance, though the projectId paragraph is close to boilerplate.

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?

For a six-parameter mutation with no output schema, the definition covers preconditions, side effects and timing well. It does not say what the call returns or point to peaka_get_cache_statuses for tracking the initial sync, which is the main remaining gap for an async-style operation.

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 coverage is 67%, and the description compensates for the undocumented schedule parameters by explaining they are optional at creation, absent by default, expressed as ISO-8601 durations (PT6H, P1D, P7D, P30D), and settable later via peaka_update_cache. It also explains how to obtain projectId, though schemaName and tableName semantics are left to the schema and the referenced list tools.

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?

States a specific verb and resource ('Create a cache for a table') and immediately explains the effect: records are read from Peaka instead of the source. It is clearly distinguishable from peaka_update_cache, peaka_refresh_cache_*, and peaka_create_cache_batch by scope and intent.

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

Usage Guidelines5/5

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

Gives explicit when-to-use criteria (only SaaS source tables not yet cached, identifiable via peaka_list_project_tables '[cached]' markers or peaka_list_tables 'not_cached'), explicit when-not (database tables like Oracle are read live and in full), and an explicit consent gate: create only when the user asks or agrees, never to work around a slow or failing query. It also routes schedule changes to peaka_update_cache.

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