Skip to main content
Glama
peaka-mcp-server

peaka-mcp-server

Official
by peakacom

peaka_create_cache_batch

Create caches for multiple SaaS tables in one call instead of repeated single-cache requests. Each item is processed independently, so check every entry for success or error and retry failures.

Instructions

Create caches for multiple tables in a single call. Use this instead of repeated peaka_create_cache calls when caching many tables. 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. Items are processed independently, so some can succeed while others fail: the response contains one entry per item with success, error, and the created cache. Check every entry and report or retry the failed ones rather than assuming the whole batch succeeded. Each item supports the same optional schedule expressions as peaka_create_cache (ISO-8601 durations, e.g. PT6H, P1D, P7D, P30D).

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>",
      "items": "<items>"
    },
    "name": "peaka_create_cache_batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemsYesTables to cache. Must contain at least one item.
projectIdYesThe Peaka project ID to run against.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.15.5
    • addedInput schema / properties / items / items / 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 / items / items / properties / fullRefreshSchedule / $ref
      Removed value: -"#/properties/items/items/properties/incrementalSchedule"
    • addedInput schema / properties / items / items / 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 / items / items / properties / fullRefreshSchedule / $ref
      Added value: +"#/properties/items/items/properties/incrementalSchedule"
    • changedInput schema / properties / items / items / 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."
    • removedInput schema / properties / items / items / properties / fullRefreshSchedule / type
      Removed value: -"string"
    • addedInput schema / properties / items / items / 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 / items / items / 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."
    • removedInput schema / properties / items / items / properties / incrementalSchedule / type
      Removed value: -"string"
  4. First observedv0.11.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare it is a non-read-only, non-destructive, closed-world write; the description adds substantive behavior beyond that: per-item independent execution with partial success, a response entry per item containing success/error/created cache, the need to inspect and retry failures, and the fact that the first sync takes time so the cache is incomplete until it finishes. None of this contradicts 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.

Conciseness4/5

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

Front-loaded with purpose and the sibling comparison, then eligibility, consent, and response semantics in a logical order; nearly every sentence carries unique information. It is dense and long, with slight redundancy between the 'first sync takes time' note and the schedule-expression sentence restating schema examples.

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

Completeness5/5

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

Although there is no output schema, the description explains the return shape (one entry per item with success, error, and created cache) and how to act on it. Combined with the eligibility rules, consent policy, and projectId discovery step, an agent has everything needed to invoke and interpret this tool correctly.

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 100%, so the baseline is 3; the description earns a point by clarifying that 'items' are tables of an eligible SaaS source and that each item accepts the same optional schedule expressions as peaka_create_cache, with ISO-8601 examples. It also handles the projectId prerequisite by routing to peaka_list_projects and asking the user, though it does not explain catalogId vs schemaName/tableName composition beyond the schema.

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 caches for multiple tables in a single call') and immediately distinguishes itself from the single-item sibling peaka_create_cache. An agent can tell exactly what this does and when it is the batch variant.

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?

Explicitly names the alternative ('Use this instead of repeated peaka_create_cache calls when caching many tables') with the selecting condition. It also gives precise eligibility rules (SaaS source tables not yet cached, verified via peaka_list_project_tables or peaka_list_tables not_cached; database tables like Oracle are never cached) and an exclusion ('never to work around a failing or slow query') plus a consent requirement.

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