Time Entries

6 actions. Each is callable by the agent as a tool, over HTTP via /api/invoke, and (usually) from a UI page.

time_entries.start

POST · mutating

Start a running timer for the given actor. Fails if a timer is already open.

  • AI tool: time_entries_start
  • API: POST /api/invoke/time_entries.start

Input

Field Type Required Description
actorId string yes
description string
projectId string
missionId string
ticketId string
billable boolean
rateOverride number
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "actorId": {
      "type": "string",
      "minLength": 1
    },
    "description": {
      "type": "string"
    },
    "projectId": {
      "type": "string",
      "minLength": 1
    },
    "missionId": {
      "type": "string",
      "minLength": 1
    },
    "ticketId": {
      "type": "string",
      "minLength": 1
    },
    "billable": {
      "type": "boolean"
    },
    "rateOverride": {
      "type": "number"
    }
  },
  "required": [
    "actorId"
  ]
}

time_entries.stop

POST · mutating

Stop the actor's currently-running timer. Materializes a ledger row using the actor's hourly rate.

  • AI tool: time_entries_stop
  • API: POST /api/invoke/time_entries.stop

Input

Field Type Required Description
id string
actorId string
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "actorId": {
      "type": "string",
      "minLength": 1
    }
  }
}

time_entries.list

GET

List time entries.

  • AI tool: time_entries_list
  • API: GET /api/invoke/time_entries.list

Input

Field Type Required Description
actorId string
projectId string
missionId string
status "open" | "submitted" | "approved" | "rejected" | "invoiced"
openOnly boolean
since any
until any
limit integer
offset integer
orderBy string
orderDir "asc" | "desc"
q string
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "actorId": {
      "type": "string",
      "minLength": 1
    },
    "projectId": {
      "type": "string",
      "minLength": 1
    },
    "missionId": {
      "type": "string",
      "minLength": 1
    },
    "status": {
      "type": "string",
      "enum": [
        "open",
        "submitted",
        "approved",
        "rejected",
        "invoiced"
      ]
    },
    "openOnly": {
      "type": "boolean"
    },
    "since": {},
    "until": {},
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 500
    },
    "offset": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "orderBy": {
      "type": "string"
    },
    "orderDir": {
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ]
    },
    "q": {
      "type": "string"
    }
  }
}

time_entries.approve

POST · mutating

Approve a submitted time entry. Approved entries are eligible for invoicing.

  • AI tool: time_entries_approve
  • API: POST /api/invoke/time_entries.approve

Input

Field Type Required Description
id string yes
approverActorId string
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "approverActorId": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "id"
  ]
}

time_entries.update

PATCH · mutating

Update a time entry (description, scope, billable, etc.).

  • AI tool: time_entries_update
  • API: PATCH /api/invoke/time_entries.update

Input

Field Type Required Description
id string yes
patch object yes
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "patch": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "actorId": {
          "type": "string",
          "minLength": 1
        },
        "startedAt": {},
        "endedAt": {
          "anyOf": [
            {},
            {
              "type": "null"
            }
          ]
        },
        "durationMinutes": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "description": {
          "default": "",
          "type": "string"
        },
        "billable": {
          "default": true,
          "type": "boolean"
        },
        "projectId": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "null"
            }
          ]
        },
        "missionId": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "null"
            }
          ]
        },
        "subjectId": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "null"
            }
          ]
        },
        "ticketId": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "null"
            }
          ]
        },
        "rateOverride": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "currency": {
          "default": "USD",
          "type": "string"
        },
        "status": {
          "default": "open",
          "type": "string",
          "enum": [
            "open",
            "submitted",
            "approved",
            "rejected",
            "invoiced"
          ]
        },
        "approvedBy": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "null"
            }
          ]
        },
        "approvedAt": {
          "anyOf": [
            {},
            {
              "type": "null"
            }
          ]
        },
        "ledgerEntryId": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "null"
            }
          ]
        },
        "createdAt": {},
        "updatedAt": {}
      }
    }
  },
  "required": [
    "id",
    "patch"
  ]
}

time_entries.delete

DELETE · mutating

Delete a time entry + its ledger row.

  • AI tool: time_entries_delete
  • API: DELETE /api/invoke/time_entries.delete

Input

Field Type Required Description
id string yes
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "id"
  ]
}