read_control_plane_counters

Generated automatically from the published contract sources.

Build metadata: Registered in this build. Registration describes the default dispatcher in this build. It does not guarantee that a caller has the required credential or grant, that a tool is listed for that connection, or that the required service is configured.

A script calls this action over HTTPS at POST https://turnzero.ai/api/v1/actions/read_control_plane_counters, with a bearer credential and the action's payload as the JSON body. It also accepts GET.

Contract description

Read the platform's own counter totals — not any application's — by name, per hour or per day, over a time window. Super-admin (platform operator) only.

Access and action metadata

{
  "name": "read_control_plane_counters",
  "resource": "environment",
  "tier": "observe",
  "grant": "super_admin",
  "summary": "Super-admin: the control_plane scope's counter totals by name over a window, at the hour or day grain (the logging service).",
  "annotations": {
    "readOnlyHint": true,
    "destructiveHint": false,
    "openWorldHint": false,
    "idempotentHint": true
  }
}

MCP catalog entry

{
  "name": "read_control_plane_counters",
  "tier": "observe",
  "scenario": "API-L0-12",
  "summary": "Read the platform's own counter totals — not any application's — by name, per hour or per day, over a time window. Super-admin (platform operator) only.",
  "owners": []
}

request

JSON pointer Description and constraints
"" (root) Type: object
Required fields: []
/properties/name One counter's name; omitted, every counter.

Type: string
/properties/grain `hour` or `day`; `day` where none is given.

Type: string
/properties/since Inclusive start of the time window. Use YYYY-MM-DD followed by T (or t), HH:mm, optional :ss, an optional decimal fraction of 1–9 digits after seconds, then Z (or z) or a signed HH:mm offset. The calendar date must exist; hours are 00–23, minutes and seconds 00–59, and offset hours/minutes 00–23/00–59. Leap seconds and 24:00 are not accepted. Values normalize to UTC at millisecond precision. Omission leaves this bound open; the HTTP action returns 400 invalid_request naming the member for null, empty strings, wrong types, or malformed values. MCP rejects wrong argument types before action dispatch.

Type: string
/properties/until Inclusive end of the time window. Use YYYY-MM-DD followed by T (or t), HH:mm, optional :ss, an optional decimal fraction of 1–9 digits after seconds, then Z (or z) or a signed HH:mm offset. The calendar date must exist; hours are 00–23, minutes and seconds 00–59, and offset hours/minutes 00–23/00–59. Leap seconds and 24:00 are not accepted. Values normalize to UTC at millisecond precision. Omission leaves this bound open; the HTTP action returns 400 invalid_request naming the member for null, empty strings, wrong types, or malformed values. MCP rejects wrong argument types before action dispatch.

Type: string

response

JSON pointer Description and constraints
"" (root) Type: object
Required fields: ["contract_version","scope","grain","buckets"]
/properties/contract_version Required value: 1
/properties/reference The short reference the platform recorded this call under, ten lowercase hexadecimal characters, the value the call’s record row carries; quote it when reporting the call.

Type: string
Pattern: ^[0-9a-f]{10}$
/properties/scope Required value: control_plane
/properties/grain Type: string
/properties/buckets Type: array
/properties/buckets/items Type: object
Required fields: ["name","bucket_start","total"]
/properties/buckets/items/properties/name Type: string
/properties/buckets/items/properties/bucket_start Type: string
/properties/buckets/items/properties/total Type: integer

Complete payload contract

{
  "request": {
    "type": "object",
    "required": [],
    "properties": {
      "name": {
        "type": "string",
        "description": "One counter's name; omitted, every counter."
      },
      "grain": {
        "type": "string",
        "description": "`hour` or `day`; `day` where none is given."
      },
      "since": {
        "type": "string",
        "description": "Inclusive start of the time window. Use YYYY-MM-DD followed by T (or t), HH:mm, optional :ss, an optional decimal fraction of 1–9 digits after seconds, then Z (or z) or a signed HH:mm offset. The calendar date must exist; hours are 00–23, minutes and seconds 00–59, and offset hours/minutes 00–23/00–59. Leap seconds and 24:00 are not accepted. Values normalize to UTC at millisecond precision. Omission leaves this bound open; the HTTP action returns 400 invalid_request naming the member for null, empty strings, wrong types, or malformed values. MCP rejects wrong argument types before action dispatch."
      },
      "until": {
        "type": "string",
        "description": "Inclusive end of the time window. Use YYYY-MM-DD followed by T (or t), HH:mm, optional :ss, an optional decimal fraction of 1–9 digits after seconds, then Z (or z) or a signed HH:mm offset. The calendar date must exist; hours are 00–23, minutes and seconds 00–59, and offset hours/minutes 00–23/00–59. Leap seconds and 24:00 are not accepted. Values normalize to UTC at millisecond precision. Omission leaves this bound open; the HTTP action returns 400 invalid_request naming the member for null, empty strings, wrong types, or malformed values. MCP rejects wrong argument types before action dispatch."
      }
    }
  },
  "response": {
    "type": "object",
    "required": [
      "contract_version",
      "scope",
      "grain",
      "buckets"
    ],
    "properties": {
      "contract_version": {
        "const": 1
      },
      "reference": {
        "type": "string",
        "pattern": "^[0-9a-f]{10}$",
        "description": "The short reference the platform recorded this call under, ten lowercase hexadecimal characters, the value the call’s record row carries; quote it when reporting the call."
      },
      "scope": {
        "const": "control_plane"
      },
      "grain": {
        "type": "string"
      },
      "buckets": {
        "type": "array",
        "items": {
          "type": "object",
          "required": [
            "name",
            "bucket_start",
            "total"
          ],
          "properties": {
            "name": {
              "type": "string"
            },
            "bucket_start": {
              "type": "string"
            },
            "total": {
              "type": "integer"
            }
          }
        }
      }
    }
  }
}

Shared contracts