Semogram Docs
MCPTools reference

table_maintenance_schedule

Schedule compaction, snapshot expiration or orphan discovery under an approved workspace-wide write policy. Snapshots pinned anywhere in the workspace stay protected.

When to use it

Use table_maintenance_schedule to schedule table maintenance. This tool operates at workspace scope. It does not require a project context unless a filtering argument explicitly asks for one.

Plugin requirements

Requires the Iceberg connector (@craven/iceberg). The selected data endpoint must use that connector, with its catalog and storage configured. These are platform MCP tools backed by the connector, not a separate maintenance plugin. Use the plugin setup guides for configuration. Inspect the workspace’s plugin installations and check the installation before executing it.

Arguments

NameTypeRequiredDefaultConstraints
dataEndpointIdstringYes—Format: uuid; Pattern constraint; see full schema
policyobjectYes—Fields: id, version
kindstringYes—Allowed: "compact", "expire", "discover_orphans"
scheduledForstringNo—Format: date-time; Pattern constraint; see full schema
targetFileSizeBytesintegerNo—Minimum: 1048576; Maximum: 9007199254740991
olderThanstringNo—Format: date-time; Pattern constraint; see full schema
retainLastintegerNo—Maximum: 10000; Greater than: 0
orphanGraceHoursintegerNo—Minimum: 24; Maximum: 8760
idempotencyKeystringYes—Minimum length: 8; Maximum length: 200

View the complete input schema, including nested contracts and alternative shapes. The schema is extracted from the workspace server’s Zod definitions. Runtime validation also enforces custom checks that JSON Schema cannot express.

Response shape

The implementation constructs payloads using these fields: job. The returned fields depend on the execution path.

MCP returns a text block containing the JSON operation result and a structuredContent copy. The envelope includes data, completeness, truncated, freshness, and warnings. Depending on the operation it can also include nextCursor, evidence, job, or receipt.

Check those fields before treating a conversational summary as the result. When a job is returned, inspect its status with the appropriate execution tool; a queued response is not confirmation that work finished. Follow evidence links when checking the underlying records.

Input methods

This request illustrates the argument structure. Replace every angle-bracket placeholder with a real value and supply any applicable optional fields from the schema. Nested business contracts must match your actual configuration. Send it through an authenticated, initialized MCP client; this JSON alone does not establish a session or sign you in.

Use Semogram’s table_maintenance_schedule tool to schedule table maintenance. Inspect the required inputs and target first, then show me what will change before executing it.

Use real resource IDs returned by earlier reads; a resource name is not a UUID. Do not fill missing business inputs with invented values.

This is an MCP tools/call request, not a form to paste into Semogram. Send it through an authenticated, initialized MCP client.

MCP request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "table_maintenance_schedule",
    "arguments": {
      "dataEndpointId": "<DATA_ENDPOINT_ID_UUID>",
      "policy": {
        "id": "<ID_UUID>",
        "version": 1
      },
      "kind": "compact",
      "idempotencyKey": "<UNIQUE_KEY_FOR_THIS_OPERATION>"
    }
  }
}

FAQ

What access and approvals are required?

Required permission scopes: data:maintain. OAuth uses current workspace membership; API keys use their assigned scopes and grants. Discovery can exclude tools the caller cannot use.

Read-only annotation: No. Destructive annotation: Yes. The server marks this tool as potentially destructive. Review the intended changes before calling it; follow its schema and the applicable server-side policy.

How should I handle retries?

The server marks this operation as idempotent. When an idempotencyKey is accepted, keep the same key only for a retry of the exact same input; use a new key for new work. For 429 responses, honor Retry-After rather than retrying immediately.

Why is this tool missing or returning an error?

Confirm the workspace, resource IDs, and permission scopes. Read the returned error before changing the request. See connection, authentication and troubleshooting for sign-in, scope, resource access, and rate-limit errors.