Endpoint and auth
tools/list and tools/call.
Ground yourself first
It tells you:
It also tells you the organization and today’s date in the organization’s timezone, which you need for date arithmetic.
Discovery
1
List tools
tools/list returns exactly what your credential can call. There is no hidden surface — listing and calling share the same predicate, so an invisible tool is an uncallable one. Do not guess at tool names you cannot see.2
Use bare `search` to find things
A generic search across the organization. Returns records with identifiers you can then act on.
3
Use bare `fetch` to read one
Retrieves a single record by the identifier
search returned.search and fetch pair exists for hosts that expect that shape (ChatGPT’s deep research, among others). If you have the specific tools available — ontime_employee_search, ontime_leave_get — prefer them; they return richer, better-typed results.
Self-service versus on-behalf
Decide which you are doing before choosing the tool.
Conventions
Dates
Dates
YYYY-MM-DD for a date, YYYY-MM for a month. Always. Never a locale format, never a natural-language date.Use the current date from ontime_whoami — the organization’s timezone is what matters, not yours.Identifiers
Identifiers
Employees are identified by UUID, not by employee code or name. Resolve a name to an ID with
ontime_employee_search first.Never construct or guess an ID.Pagination
Pagination
List tools return a page. Check the total against what you have before concluding a queue is empty.
Errors are informative
Errors are informative
A failing mutation returns the domain’s own error verbatim —
"bad_stage" (HTTP 409): …. Read it and change your input. Retrying the same call produces the same failure.Confirm-gated writes
Before any write
1
Read the current state
Use the matching read tool. Payroll in particular is a state machine —
ontime_payroll_overview tells you which stage the cycle is at, and calling a stage out of order fails.2
Confirm the subject
If you are acting on somebody, confirm you have the right person.
ontime_employee_get on the ID you resolved.3
Expect scope refusals
A
403 about approval scope means you are not the subject’s direct manager and lack hr:approve. That is not retryable and not a transitive check — being the manager’s manager does not help.Things that will not work
- Approving your own request. The same-actor rule applies to you as it does to a human.
- Writing to a frozen payroll month. Punches and attendance-affecting approvals are refused.
- Reaching another organization. Your credential is bound to one.
- Guessing a tool that is not in
tools/list. It is not there because you cannot call it.
This documentation is machine-readable
Every page on this site has a plain-Markdown twin at the same URL with.md appended, and /llms.txt indexes the site. Fetch those rather than parsing HTML.