{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nirvanahq-com/json-schema/nirvanahq-com-mcp-counts-response-schema.json",
  "title": "McpCountsResponse",
  "description": "GET /v1/counts?profile=mcp: each count is the total of its `query` (and `due` of its `due_query`), so an agent can list exactly what it counted. Finished work is not a list here; ask is:done.\n",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nirvanahq-com-openapi.yaml#/components/schemas/McpCountsResponse",
  "type": "object",
  "required": [
    "ok",
    "grammar_version",
    "lists"
  ],
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "grammar_version": {
      "type": "integer"
    },
    "today": {
      "type": "string",
      "format": "date"
    },
    "timezone": {
      "type": "string"
    },
    "scope": {
      "$ref": "#/$defs/McpScope"
    },
    "lists": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "list": {
            "type": "string",
            "enum": [
              "inbox",
              "focus",
              "next",
              "later",
              "waiting",
              "scheduled",
              "someday",
              "projects",
              "reference",
              "trash"
            ]
          },
          "count": {
            "type": "integer"
          },
          "query": {
            "type": "string"
          },
          "due": {
            "type": "integer"
          },
          "due_query": {
            "type": "string"
          },
          "feature_off": {
            "type": "boolean",
            "description": "Present (true) when the account has this list's feature turned off (Settings > Workflow > Features) but the list still holds items. A switched-off list that is empty is not listed at all; Focus switched off is never listed (its tasks are in Next). Later is off unless the account enabled it."
          },
          "note": {
            "type": "string",
            "description": "With feature_off: what to tell the user (the feature is off; N items remain; help re-file them)."
          }
        }
      }
    },
    "review": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "check": {
            "type": "string"
          },
          "count": {
            "type": "integer"
          },
          "query": {
            "type": "string"
          }
        }
      }
    }
  },
  "$defs": {
    "McpScope": {
      "type": "object",
      "properties": {
        "area": {
          "type": "string"
        },
        "areamode": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "inclusive",
            "exclusive",
            null
          ]
        }
      }
    }
  }
}