PTD — Plan Track Done
io.github.danimoya/ptd
Serveur MCP OK 161 outils
Hybrid human+AI work tracker: tasks with human minutes vs agent tokens and cost.
Fiche technique
- Auteur
- danimoya (espace de noms du registre)
- Dépôt
- github.com/danimoya/ptd
- Site
- ptd.foor.tech
- Version
- 0.1.1
- Transport
- Streamable HTTP
- Authentification
- Aucune (constatée par notre test)
- Adresse du serveur
- https://ptd.foor.tech/mcp Streamable HTTP en-tête requis :
Authorization - Outils
- 161
- Catégories
- IA, agents et mémoire
- Dernière mise à jour
- 29 nov. 2026
- Publication
- 29 nov. 2026
Badge pour votre README
Gratuit, pour toute fiche. Il renvoie vers cette fiche et affiche « testé OK » tant que notre dernier test est réussi.
[](https://latlas.dev/mcp/io.github.danimoya/ptd)<a href="https://latlas.dev/mcp/io.github.danimoya/ptd"><img src="https://latlas.dev/badge/fiche/io.github.danimoya/ptd.svg" alt="Référencé sur L’Atlas" height="20"></a>Nos tests
Chaque semaine : initialize puis tools/list, sans identifiant, sans jamais appeler d’outil. Méthode
- Adresse
- https://ptd.foor.tech/mcp
- Dernier résultat
- OK 30 nov. 2026, 08:55
- Temps de réponse
- 459 ms (initialize + tools/list)
- Version du protocole
- 2025-11-25
- Nom annoncé
- ptd 0.1.0
- Outils
- 161
Historique
| Date | Résultat | Réponse | Outils |
|---|---|---|---|
| 30 nov. 2026, 08:55 | OK | 459 ms | 161 |
Outils exposés (161, réponse à tools/list, 30 nov. 2026)
account.security
My second-factor state
Whether two-factor authentication is on for your account, how many recovery codes are left, which providers are linked, and whether this organization requires 2FA. What the Org → Security tab reads.
Aucun paramètre.
ai.connect
Connect an AI provider key
Store this organization's own Anthropic or OpenAI key, sealed with AES-256-GCM, and use it for every AI call instead of the deployment's. The provider bills you directly and PTD meters nothing. The key is never returned by any action — `ai.status` shows the provider, the model and the last four characters. Connecting again replaces the stored key. Admin only, and recorded in the audit log.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| provider | enum: "anthropic" | "openai" | oui | Which provider the key belongs to. |
| apiKey | string | oui | The provider API key. Stored sealed; never echoed back. |
| model | string | non | Override the provider's default model for this organization. |
| baseUrl | string | non | Point at a gateway or proxy instead of the provider's own host. |
ai.disconnect
Disconnect the AI provider key
Forget this organization's stored provider key. AI then falls back to the deployment's own key where one is configured — on the hosted instance that means Team and Business calls start being metered at cost plus 20% again. Admin only, and recorded in the audit log.
Aucun paramètre.
ai.status
AI status
Whether AI is available to this organization and whose key would answer: its own (connected with ai.connect, billed by the provider) or this deployment's (billed on at cost plus 20% on Team and Business). Never returns a key — only the provider, the model and the last four characters. The only AI action that works unconfigured.
Aucun paramètre.
ai.usage
AI usage
Tokens and estimated dollars this organization has spent on AI suggestions, from the ai_usage ledger: one row per provider call, so the numbers survive a restart and are the same on every app replica. Totals for the window (30 days by default, up to 365) with breakdowns by day, by member, by model and by action. Costs are estimates from a static price table; `meterCents` is what those calls would be billed on for at cost plus 20% when PTD's key answered them. `thisProcess` is the last 500 calls this server process happened to make — the same ledger seen through a keyhole, useful right after a batch run.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| days | integer | non | How many days back to count, 1–365 (default 30). |
app.create
Create app
Register an app the organization owns. `key` is the short slug used in tables and filters and must be unique within the organization.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| key | string | oui | Short lowercase slug, e.g. `web` or `core-api`. |
| name | string | oui | Human-readable name. |
| urls | array<string> | non | Live http(s) URLs for the app. |
| repo | string | non | Repository reference, e.g. `github:acme/web`. |
| stack | array<string> | non | Technologies, e.g. ["Rust","Postgres"]. |
app.get
Get app
One app with its URLs, repo, stack, streams and computed task counters.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| appId | integer | oui | App id, from app.list. |
app.list
List apps
Every app (product / service / codebase) the organization tracks, each with its open-task count, critical count, highest open priority and the streams touching it.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| includeArchived | boolean | non | Include archived apps (default false). |
app.stats
App stats
Open tasks, critical tasks (priority ≥ 75), highest open priority and the streams touching one app.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| appId | integer | oui | App id, from app.list. |
app.update
Update app
Change an app's name, URLs, repo, stack or archived flag. Omitted fields are left alone. The key is immutable — it is what external references point at.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| appId | integer | oui | App id, from app.list. |
| name | string | non | New display name. |
| urls | array<string> | non | Replacement list of http(s) URLs for this app. |
| repo | string | null | non | Source repository, or null to clear it. |
| stack | array<string> | non | Replacement list of stack labels. |
| archived | boolean | non | Archive hides the app from app.list and the KPI count without deleting its history. |
audit.export
Export the audit log as CSV
Every audit row in the range as one CSV document (RFC 4180, UTF-8), oldest first, so it can be filed, diffed or handed to an auditor. No paging: the whole range comes back in `csv`. Narrow it with from/to on a busy organization.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| from | string | non | ISO 8601 lower bound, inclusive. |
| to | string | non | ISO 8601 upper bound, inclusive. |
| kind | string | non | One kind, e.g. "member.role_changed". A trailing dot is a prefix: "token." matches every token event. |
audit.list
Read the audit log
Who did what in this organization, newest first: sign-ins and failed sign-ins, 2FA turned on or off, providers linked, roles changed, members removed, tokens minted and revoked, agents registered, integrations connected and disconnected, billing opened, the security policy changed, data exported. Filterable by date range and kind, paged up to 200 rows. Returns the kinds this organization has actually produced, for building a filter.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| from | string | non | ISO 8601 lower bound, inclusive. |
| to | string | non | ISO 8601 upper bound, inclusive. |
| kind | string | non | One kind, e.g. "member.role_changed". A trailing dot is a prefix: "token." matches every token event. |
| limit | integer | non | Rows to return (default 50, max 200). |
| offset | integer | non | How many rows to skip (default 0). |
billing.change_plan
Change plan
Move an existing subscription to another plan or billing interval in place — Team↔Business, monthly↔annual — rather than starting a second Checkout. Stripe prorates the difference onto the next invoice (`create_prorations`), the subscription keeps its identity and any discount, and the seat quantity is set from the current human count. An organization with no subscription yet is sent to billing.checkout instead. Owner only.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| plan | enum: "team" | "business" | oui | Which plan to buy: team ($15/org/month) or business ($49/org/month). |
| interval | enum: "month" | "year" | non | month, or year for two months free (Team $150, Business $490). Defaults to month. |
billing.checkout
Start checkout
Create a Stripe Checkout Session for a plan and interval and return its URL for the browser to follow. The session carries the flat plan price, the seat price when Business is already past 50 humans, and both usage meters; promotion codes (FOUNDING) are accepted there. Owner only.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| plan | enum: "team" | "business" | oui | Which plan to buy: team ($15/org/month) or business ($49/org/month). |
| interval | enum: "month" | "year" | non | month, or year for two months free (Team $150, Business $490). Defaults to month. |
billing.contractors
Contractors and what is owed
Every billable member with their rate, how many minutes of the named month are approved, pending or unsubmitted, and whether an invoice has already been issued for that month. One read for the billing overview, so the UI does not have to preview each contractor in turn.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| month | integer | non | Calendar month, 1–12. |
| year | integer | non | Calendar year. |
billing.portal
Manage billing
Create a Stripe Customer Portal session — card, invoices, cancellation — and return its URL. Owner only; requires an existing Stripe customer.
Aucun paramètre.
billing.status
Billing status
Everything the Billing tab draws: the plan and interval, the price list, the seat limits and what is in use (humans, agents, total, billable overage), the metered add-ons so far this period (certified invoices, AI cents), the live subscription state, and the founding-member code while one is on offer. On a self-hosted deployment it answers { hosted: false } and nothing else — there is no billing to report.
Aucun paramètre.
billing.sync
Sync subscription
Re-read the subscription from Stripe and apply it to the organization — plan from the base price, interval, item ids and the period. The Checkout success redirect calls this so the plan is correct even before the webhook lands; safe to call at any time. Owner only.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| sessionId | string | non | Checkout Session id from the success redirect (session_id), if available. |
blocked_tasks
Blocked tasks
Cards waiting on at least one dependency that is neither complete nor already finished — the work that cannot legitimately start yet.
Aucun paramètre.
budget.check
Check an agent budget
Where a stream stands against its monthly agent budget: `{ streamId, name, mode, budgetUsd, spentUsd, remainingUsd, burnPct, overBudget, enforced, blocked, periodStart }`. Omit streamId and you get `{ streams: [...], blocked: [...], totals }` for every live lane instead. `blocked: true` means an agent credential will be refused this lane's work by `next_task` — the check an autonomous worker should make before it starts, so it can pick a different lane rather than discover the refusal as an empty queue. Spend is month-to-date and prefers the verified cost of each session over the self-reported one.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| streamId | integer | non | One stream, or omit for every live stream. |
critical_path
Critical path
The longest dependency chain in the organization weighted by estimated duration (totalDays/tasks), plus a full critical-path-method schedule in perTask: earliest/latest start and finish for every card, its float in days, and whether it has none left. Float is the slack a card has before it drags the whole plan; zero float is the critical path the Plan surface outlines in red.
Aucun paramètre.
customer.create
Add a customer
Add a customer to the organization.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| name | string | oui | Customer name. |
| weeklyGoalHours | integer | null | non | Hours a week this customer is meant to get. |
| billingAddress | string | null | non | Postal address for invoices. |
| billingEmail | string | null | non | Where invoices are sent. |
customer.delete
Delete a customer
Remove a customer. Time entries and streams that pointed at it keep their history but lose the reference.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| customerId | integer | oui | The customer to remove. |
customer.goals
Weekly goal vs logged, per customer
Every customer's weekly goal against what the organization actually logged for them this week, with the human/agent split and a per-stream breakdown. A session bills to the customer of the stream it sits in (falling back to the session's own customer when it has no stream). Monday-first weeks.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| weekOf | string | non | Any instant inside the week to report on. Defaults to this week. as an ISO-8601 datetime (or YYYY-MM-DD for midnight local). |
customer.list
List customers
Customers in the organization, for attributing and billing time.
Aucun paramètre.
customer.update
Edit a customer
Change a customer's name, weekly goal or billing details.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| customerId | integer | oui | The customer to edit. |
| name | string | non | Customer name. |
| weeklyGoalHours | integer | null | non | Hours a week this customer is meant to get. |
| billingAddress | string | null | non | Postal address for invoices. |
| billingEmail | string | null | non | Where invoices are sent. |
digest.preview
Preview the weekly digest
Render the last seven days of the hybrid summary as an email — subject, HTML and plain text — without sending it. The body is the same computed narrative, the same figures and the same per-stream agent spend the Overview → Hybrid tab shows. No scheduler: fetch it on your own cadence.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| days | integer | non | Window length in days, counting back from today (default 7). |
field.archive
Archive a custom field
Retire a field without losing what cards already recorded in it: the values stay in the database but stop being offered, returned or writable. Pass archived: false to bring it back.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| fieldId | integer | oui | Custom field id, from field.list. |
| archived | boolean | non | Default true |
field.create
Create a custom field
Define an extra field on every card in the organization. The key every wire shape uses (`custom: { severity: "high" }`) is derived from the name once and then fixed, so renaming the field keeps existing payloads working.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| name | string | oui | Label shown on the card, e.g. "Customer severity" |
| kind | enum: "text" | "number" | "date" | "select" | "multiselect" | "checkbox" | "url" | oui | What the field holds |
| options | array<string> | non | Choices for a select or multiselect field; rejected for every other kind |
| position | integer | non | Order in the card's Fields section, ascending |
field.list
List custom fields
Every custom field defined for the organization, in display order, with its key, kind and options.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| includeArchived | boolean | non | Include archived fields (default false) |
field.update
Update a custom field
Rename a field, reorder it, change a select's options or (un)archive it. `kind` is immutable — the values already on cards were validated against it. An option still used by a card cannot be removed.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| fieldId | integer | oui | Custom field id, from field.list. |
| name | string | non | New field name. |
| options | array<string> | non | Choices for a select or multiselect field; rejected for every other kind |
| position | integer | non | Display order, ascending. |
| archived | boolean | non | Archive hides the field without deleting stored values. |
github.disconnect
Disconnect GitHub
Forget the installation and every mapping. Cards keep their externalKey and history, and the App itself stays installed on GitHub until someone removes it there — this only stops PTD acting on it.
Aucun paramètre.
github.list_mappings
List GitHub mappings
Every stream ↔ repository mapping in this organization, with its direction and the outcome of its last sync.
Aucun paramètre.
github.map_stream
Map a stream to a GitHub repository
Bind one stream to one repository. `in` imports issues as tasks, `out` opens and closes issues from tasks, `both` does each. A stream maps to at most one repository, so mapping it again replaces the previous mapping. Inbound writes run as you, with your role.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| streamId | integer | oui | Stream to bind |
| repo | string | oui | "owner/name", or a github.com URL |
| direction | enum: "both" | "in" | "out" | non | both = mirror each way, in = GitHub → PTD only, out = PTD → GitHub only |
github.status
GitHub status
Whether this server has a GitHub App configured, whether this organization has installed it, which account it was installed on, and every stream ↔ repository mapping with its last sync. Never returns a token — installation tokens are minted per hour and never stored.
Aucun paramètre.
github.sync_now
Import open issues now
Pull every open issue of the mapped repository and upsert it as a task keyed on `gh:owner/name#N` — labels become tags, a milestone due date becomes the card's due date, and an assignee whose GitHub profile shows an email that matches a member is assigned. Idempotent: run it twice and nothing changes the second time. Closed issues are left out; a close arrives by webhook.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| streamId | integer | oui | The mapped stream to sync |
github.unmap_stream
Unmap a stream from GitHub
Stop syncing one stream. Existing cards keep their `gh:owner/name#N` externalKey and their history; nothing is deleted on either side, and mapping the stream again picks the same cards back up.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| streamId | integer | oui | Stream id to stop syncing. |
hybrid.summary
Hybrid summary
The human/agent split for the whole organization over one window: `series` (worked minutes per day or week, split human vs agent, with the agent's tokens and dollars), `byStream` (the same split per stream, plus each stream's agent budget, burn percentage and whether it is over), `byApp` (split by the app the worked task belongs to), `topAgents` (minutes, tokens, dollars and tasks closed per agent seat), `perCompletedTask` (median and mean agent minutes/tokens/dollars for the tasks completed in the window, counted over each task's whole life so work done before the window still counts), `totals`, and `narrative` — one computed paragraph stating the split, where the money went and whether the budget held. Defaults to the last 30 days bucketed by day. Breaks and still-running sessions are excluded: a break is not work and an open session has no duration to report.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| from | string | non | Start of the window as an ISO-8601 datetime (or YYYY-MM-DD for midnight local). |
| to | string | non | End of the window as an ISO-8601 datetime (or YYYY-MM-DD for midnight local). |
| groupBy | enum: "day" | "week" | non | Bucket size for `series`. Weeks start on Monday, in the caller's local time. |
ical.url
Calendar feed URL
The .ics subscription URL for this organization's scheduled cards. Calendar apps cannot send an Authorization header, so the credential is in the path: treat the URL as a secret, and revoke the 'ical' token in Org → Tokens to kill the feed. scope 'me' (default) shows the cards assigned to you; scope 'org' shows every scheduled card and needs the manager role.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| scope | enum: "me" | "org" | non | 'me' = your cards; 'org' = every scheduled card (manager+). |
identity.list
List linked sign-in providers
The Google, GitHub or Microsoft accounts linked to your PTD account, with the address each one reported. Also reports which providers this deployment has configured at all, so a client can offer the ones that exist and no others.
Aucun paramètre.
identity.unlink
Unlink a sign-in provider
Detach one linked provider from your account. Unlinking the last one needs `confirm: true`: an account that was created *through* a provider has a random password nobody knows, so dropping its only identity means going through “Forgot password” before you can sign in again.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| identityId | integer | oui | Identity id, from identity.list. |
| confirm | boolean | non | Required when this is the only linked provider. |
import.commit
Commit a CSV import
Write the rows. Tasks are matched on externalKey and updated rather than duplicated, so re-running the same file is idempotent; streams (and customers, for time sheets) are created by name when missing; every task write leaves a task_events row with via=import. Pass dryRun: true to get import.preview's answer instead.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| source | enum: "auto" | "jira" | "trello" | "asana" | "linear" | "notion" | "generic" | "toggl" … | non | Where the file came from. "auto" detects it from the header row. One of: jira, trello, asana, linear, notion, generic, toggl, clockify, harvest. |
| csv | string | oui | The CSV file's text, header row included. Up to 5 MB. |
| mapping | object | non | Overrides for the detected column mapping: {" ": " "}. Use "-" to drop a column. |
| streamId | integer | non | File every row under this stream, whatever the source says. |
| defaultStreamName | string | non | Stream for rows with no stream of their own; created if it does not exist. |
| dryRun | boolean | non | true behaves exactly like import.preview and writes nothing. |
import.history
Recent imports
The last 20 imports committed in this organization, newest first, from the import_runs table — every replica's runs, and they survive a restart. Plus the all-time count of task rows written by an import (task_events with via=import and an import: note).
Aucun paramètre.
import.preview
Preview a CSV import
Dry run. Detects which tool the CSV came from, shows the column → PTD field mapping it will use, normalises the first rows, and counts what a commit would create, update or skip. Writes nothing. Run this first: it is the same code path as import.commit, so what it reports is what will happen.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| source | enum: "auto" | "jira" | "trello" | "asana" | "linear" | "notion" | "generic" | "toggl" … | non | Where the file came from. "auto" detects it from the header row. One of: jira, trello, asana, linear, notion, generic, toggl, clockify, harvest. |
| csv | string | oui | The CSV file's text, header row included. Up to 5 MB. |
| mapping | object | non | Overrides for the detected column mapping: {" ": " "}. Use "-" to drop a column. |
| streamId | integer | non | File every row under this stream, whatever the source says. |
| defaultStreamName | string | non | Stream for rows with no stream of their own; created if it does not exist. |
insights.patterns
When the work happens
The shape of a window: minutes by hour of day and by weekday (human vs agent in both), a 7×24 heat matrix for the heat strip, break count and frequency, the longest unbroken stretch of work, and the peak hour and weekday. Defaults to the trailing 30 days.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| from | string | non | Start of the window as an ISO-8601 datetime (or YYYY-MM-DD for midnight local). |
| to | string | non | End of the window as an ISO-8601 datetime (or YYYY-MM-DD for midnight local). |
| streamIds | array<integer> | non | Restrict the report to these streams. Omit for every stream. |
| userId | integer | string | non | Whose ledger to report on. Manager and above only; "all" reports the whole organization. Defaults to the caller. |
insights.summary
The window in plain English
Three to six sentences reading the window back: how much was logged and over how many sessions, what the agents logged and what their API cost came to, when the work clusters, the longest unbroken stretch, and how breaks were taken. Every figure is computed from the ledger — there is no language model in this path, and the same window always produces the same words.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| from | string | non | Start of the window as an ISO-8601 datetime (or YYYY-MM-DD for midnight local). |
| to | string | non | End of the window as an ISO-8601 datetime (or YYYY-MM-DD for midnight local). |
| streamIds | array<integer> | non | Restrict the report to these streams. Omit for every stream. |
| userId | integer | string | non | Whose ledger to report on. Manager and above only; "all" reports the whole organization. Defaults to the caller. |
invitation.resend
Resend an invitation
Mail an outstanding invitation again and push its expiry out another seven days. The token is unchanged, so a link from the first letter still works. Returns `acceptUrl` and a `delivery` verdict: `{sent:true}`, or `{sent:false, reason:"smtp_not_configured"}` on a deployment with no SMTP — in which case paste `acceptUrl` to the invitee yourself. An invitation that has already been accepted cannot be resent.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| invitationId | integer | oui | Invitation id, from GET /api/orgs/current/invitations. |
invoice.contractor_generate
Issue a certified contractor invoice
Commit the month: freeze every billed entry into a signed snapshot, lock those entries against further edits, and hand back the invoice's verification URL and PDF. The snapshot records each entry's times and a hash of its immutable columns; the whole record is hashed and signed with the deployment's Ed25519 key, so anyone holding the document can confirm at the verification URL that PTD issued it and that the hours behind it have not moved since. Refuses a month with nothing to bill, and refuses entries an earlier invoice already claimed.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| userId | integer | oui | The external member being invoiced. |
| month | integer | oui | Calendar month, 1–12. |
| year | integer | oui | Calendar year. |
| onlyApproved | boolean | non | Bill only entries a manager approved. Defaults to the member's own `requireApproval` setting, so a gated member is never invoiced for unapproved hours by accident. |
invoice.contractor_list
Contractor invoices issued
Every certified contractor invoice, newest period first, with the member it was rendered for, the amount, whether it has been voided, and its verification URL and PDF. A member sees only their own.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| userId | integer | non | Only this member's invoices. |
| limit | integer | non | Maximum rows (default 100). |
invoice.contractor_preview
What a contractor's month would bill
The invoice an external member's month would produce: one line per day × stream × task with its minutes, whether a human or an agent produced them, the rate and the amount, plus the totals and how many minutes are being left out because they are unapproved. Nothing is written. The member may read their own; anyone else's needs manager or above.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| userId | integer | oui | The external member being invoiced. |
| month | integer | oui | Calendar month, 1–12. |
| year | integer | oui | Calendar year. |
| onlyApproved | boolean | non | Bill only entries a manager approved. Defaults to the member's own `requireApproval` setting, so a gated member is never invoiced for unapproved hours by accident. |
invoice.generate
Commit a month's invoice
Issue the invoice: freeze the month's entries into a signed snapshot, lock them against further edits, and hand back the document's verification URL and PDF. The snapshot records each entry's times and a hash of its immutable columns; the record is hashed and signed with the deployment's Ed25519 key, so the customer — or their accountant — can confirm at the verification URL that this deployment issued the document and that the hours behind it have not moved since. Because the rows are now locked, re-issuing a month means voiding the first invoice with `invoice.void` rather than generating a second on top of it.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| customerId | integer | oui | The customer to bill. |
| month | integer | oui | Calendar month, 1–12. |
| year | integer | oui | Calendar year. |
invoice.list
Invoices issued
Every customer invoice recorded for the organization, newest period first, with the customer it was rendered to, who issued it, the total in minutes and money, whether it has been voided, and the URLs of its PDF and its public verification page. Contractor invoices have their own list — `invoice.contractor_list` — because a member may read their own.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| customerId | integer | non | Only this customer's invoices. |
| limit | integer | non | Maximum rows (default 100). |
invoice.preview
What a month's invoice would say
The line items a customer's month would bill: one line per stream × task with its session count, human minutes, agent minutes, agent tokens, agent API cost, the hourly rate that applies and the amount, plus the totals and the agent spend as a pass-through figure. Nothing is written — this is the document a manager reads before committing to it. A stream's own hourly rate overrides the customer's; where neither is recorded the line states hours with no money attached.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| customerId | integer | oui | The customer to bill. |
| month | integer | oui | Calendar month, 1–12. |
| year | integer | oui | Calendar year. |
invoice.recipients
Who may read an invoice
The invoice's recipient allowlist, masked: one row per named address with when it was added, whether PTD added it at issue (the contractor, a customer's billing address) or somebody shared it, how many access codes it has asked for and how many opened the details. Addresses are stored as a salted hash, so what comes back is `a••••[email protected]` and never the address. Manager and above, or the contractor the invoice is about.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| invoiceId | integer | oui | The certified invoice. |
invoice.share
Share a certified invoice
Name the people who may read an invoice, and write to them. Each address is added to the invoice's recipient allowlist and sent the verification link with a note that a six-digit code will be emailed to that address when they ask for the details on the page. The link itself proves the document is genuine and shows nothing else, so forwarding it discloses nothing. Addresses are stored only as a salted hash and a mask — sharing the same address again re-sends the letter rather than adding it twice, and there is no way to read an address back out. Manager and above, or the contractor the invoice is about.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| invoiceId | integer | oui | The certified invoice to share. |
| emails | array<string> | oui | The addresses to name as recipients. Each is sent the link and told a code will be emailed to that address on request. |
| message | string | non | A line of your own to include in the letter. |
invoice.unshare
Withdraw access to an invoice
Take an address off an invoice's allowlist. Any code already sent to it is destroyed with it, so access that a letter in an inbox could still open is actually revoked. Because addresses are stored hashed, the address has to be typed in full; answers whether it was on the list. Manager and above, or the contractor the invoice is about.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| invoiceId | integer | oui | The certified invoice. |
| string | oui | The address to remove, in full. |
invoice.void
Void an invoice
Withdraw an invoice of either kind: it is stamped voided, and the entries it froze are unlocked so they can be corrected and invoiced again. The snapshot, hash and signature are deliberately left in place — a copy of the PDF is still out there, and it must go on verifying, as voided. Admin and above; the reason is recorded in the organization's audit trail.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| invoiceId | integer | oui | The invoice to withdraw. |
| reason | string | oui | Why it is being withdrawn. |
member.billing
Read billing settings
A member's billing settings, or every member's when you name nobody. A member may always read their own; reading someone else's requires manager or above. The row says whether they are external, at what rate and in what currency, the issuer details their invoice prints, and whether their hours need approving.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| userId | integer | non | Whose settings to read. Omit for every member in the organization (manager and above), or for your own. |
member.set_billing
Set a member's billing
Mark a member as external (billable) and record what invoicing them needs: an hourly rate and currency, the legal name and address to print as the issuer, a tax id, and whether their hours must be approved by a manager before they can be invoiced. Turning `billable` off leaves the recorded rate and details alone, so switching a contractor back on does not mean re-typing them. Admin and above: a rate is money, and nobody sets their own.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| userId | integer | oui | The member to configure. |
| billable | boolean | oui | True for an external member PTD should invoice; false for salaried staff and agent seats. |
| hourlyRate | number | null | non | What an hour of their time bills at. Omit (or null) to invoice hours with no money attached. |
| currency | string | non | ISO 4217 currency of this member's rate, e.g. USD or EUR. |
| billingName | string | null | non | Legal or trading name to print as the invoice's issuer. Defaults to their display name. |
| billingAddress | string | null | non | Postal address printed under the issuer's name. |
| taxId | string | null | non | VAT / tax registration number printed on the invoice. |
| requireApproval | boolean | non | When true, their entries start as `pending` and only approved entries can be invoiced. |
next_task
Next task
The single highest-priority task still worth starting (status backlog or triaged), plus `why` — the urgency/impact/effort arithmetic behind its score. By default it only offers work nobody has claimed or work already assigned to you, which makes it safe to poll in an autonomous loop. When the caller is an **agent** credential, streams whose `budgetMode` is `enforce` and whose month-to-date agent spend has reached their `agentBudgetUsd` are skipped, and the skipped lanes come back in `skippedStreams` so the agent can say why it went elsewhere. A human caller is never budget-limited.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| streamId | integer | string | null | non | Restrict to one stream, or null / "none" for work filed against no stream. |
| appId | integer | string | null | non | Restrict to one app, or null / "none" for work filed against no app. |
| assignee | string | string | string | null | integer | non | Override the default filter: "me", null / "none" (unassigned only), "any" (ignore assignment), or a user id. |
oauth.clients
List OAuth clients
Every MCP client that has registered against this deployment's OAuth server (Claude.ai and ChatGPT connectors register themselves), with how many grants your organization has approved for each. Registration alone grants nothing — only a member's consent does.
Aucun paramètre.
oauth.my_grants
My connector grants
The MCP connectors you personally authorized for this organization, newest first, with the scope recorded at consent time, when each was last used and whether it is still live. Revoke one with oauth.revoke_grant.
Aucun paramètre.
oauth.revoke_client
Revoke an OAuth client
Cuts an MCP client off from your organization: every grant this organization approved for it is revoked, access tokens included. The registration itself is deleted too when no other organization still has a live grant on it.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| clientId | string | oui | client_id, from oauth.clients. |
oauth.revoke_grant
Revoke a connector grant
Withdraws one of your own connector authorizations: its refresh token and its live access token both stop working immediately.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| grantId | integer | oui | grantId, from oauth.my_grants. |
org.delete
Delete this organization
Deletes the organization and everything that hangs off it — streams, apps, tasks, task history, time entries, invoices, tokens, integrations, invitations, the audit log. Irreversible, and there is no copy: take `org.export` first. The exact organization name must be repeated in `confirmName`. A hosted organization with a live subscription is refused until the subscription is cancelled, so nobody deletes their way into being billed for nothing. Human members keep their accounts and their other organizations; an agent seat that existed only here is removed with it.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| confirmName | string | oui | The organization's name, exactly as it is spelled. |
org.export
Export everything this organization has
Mints a single-use download link for a ZIP of the whole organization: organization.json, members.csv, streams.csv, apps.csv, tasks.csv, task_events.csv, time_entries.csv, invoices.json and audit_events.csv, with a README naming each file. The link is good for five minutes, works exactly once, and needs no Authorization header — so it can be handed to a browser, `curl -O`, or anything else that follows a URL. The archive itself is built when the link is fetched, so it is never stale.
Aucun paramètre.
org.members
List members
Members of the organization with role and whether each is an agent seat.
Aucun paramètre.
org.security
Organization security policy
What this organization requires of its members: today, whether two-factor authentication is mandatory, and who last changed that.
Aucun paramètre.
org.set_security
Set the organization security policy
Turn the two-factor requirement on or off. With it on, every human member without 2FA is refused on org-scoped calls with `403 totp_required` and pointed at the setup page — their own account surface (/api/auth/**) keeps working, so they can enrol and carry on. Agent seats are exempt: their credential is a revocable token, not a phone. You cannot switch it on unless your own account already has 2FA, which is what stops an admin locking themselves out.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| requireTotp | boolean | oui | true = members must have TOTP enabled. |
report.compare
One period against another
The same roll-up for two windows side by side, with the difference and the percent change for total minutes, human minutes, agent minutes, agent tokens, agent cost, sessions, active days and break minutes. Each metric also carries a trend: an arrow, a direction, and whether that direction is the good one (for cost, tokens and breaks, down is good).
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| current | object | oui | The period being judged. |
| previous | object | oui | What to judge it against. |
| groupBy | enum: "day" | "week" | "month" | non | Bucket size. Weeks start on Monday; months are calendar months, both in the caller's local time. |
| streamIds | array<integer> | non | Restrict the report to these streams. Omit for every stream. |
| includeBreaks | boolean | non | Count break minutes into each bucket's `breakMinutes`. Breaks never count as work either way. |
| userId | integer | string | non | Whose ledger to report on. Manager and above only; "all" reports the whole organization. Defaults to the caller. |
report.range
Hours over a date range, bucketed
Recorded work between two instants, grouped by day, week or month. Every bucket splits human minutes from agent minutes and carries the agent's tokens and API cost, and each bucket is further split per stream. Breaks and still-running sessions never count as work. A member reports on their own ledger; manager and above may pass another member's userId, or "all".
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| from | string | oui | Start of the range (inclusive, by when a session opened) as an ISO-8601 datetime (or YYYY-MM-DD for midnight local). |
| to | string | oui | End of the range (inclusive, by when a session opened) as an ISO-8601 datetime (or YYYY-MM-DD for midnight local). |
| groupBy | enum: "day" | "week" | "month" | non | Bucket size. Weeks start on Monday; months are calendar months, both in the caller's local time. |
| streamIds | array<integer> | non | Restrict the report to these streams. Omit for every stream. |
| includeBreaks | boolean | non | Count break minutes into each bucket's `breakMinutes`. Breaks never count as work either way. |
| userId | integer | string | non | Whose ledger to report on. Manager and above only; "all" reports the whole organization. Defaults to the caller. |
report.search
Search the ledger
Case-insensitive search across entry notes and the titles of the tasks entries point at, newest first, with the total number of matches and their total minutes. Filter by window, stream, task or a minimum session length. `%` and `_` in the query are matched literally.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| query | string | oui | Text to look for in a note or a task title. |
| from | string | non | Only sessions that started at or after this instant as an ISO-8601 datetime (or YYYY-MM-DD for midnight local). |
| to | string | non | Only sessions that started at or before this instant as an ISO-8601 datetime (or YYYY-MM-DD for midnight local). |
| streamId | integer | non | Only sessions in this stream. |
| taskId | integer | non | Only sessions against this task. |
| minMinutes | integer | non | Drop sessions shorter than this. |
| limit | integer | non | Matches per page (default 25). |
| offset | integer | non | How many matches to skip (default 0). |
| userId | integer | string | non | Whose ledger to report on. Manager and above only; "all" reports the whole organization. Defaults to the caller. |
slack.check_budgets
Check agent budgets now
Run the agent-budget sweep immediately and post an alert for every stream whose agent spend has passed its budget. The same sweep runs on its own, throttled, as task events arrive; this bypasses the per-stream cooldown.
Aucun paramètre.
slack.disconnect
Disconnect Slack
Remove the workspace install: the sealed bot token is destroyed, notifications stop and slash commands from that workspace stop resolving. Members' link records are left alone, so a re-install picks up where it left off.
Aucun paramètre.
slack.link_code
Mint a Slack link code
A six-character one-time code, valid for ten minutes, that binds a Slack account to the calling PTD user. Run `/ptd link ` in Slack to spend it. Minting a new code invalidates the caller's previous one.
Aucun paramètre.
slack.set_channel
Set the Slack channel
Choose the channel completions, cascade shifts and agent-budget alerts are posted to. Invite the PTD bot to the channel first — Slack refuses to post into a channel the app is not in. Assignment notifications are DMs and do not use it.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| channelId | string | oui | Slack conversation id, e.g. C0123456789 (Slack → channel → About → copy channel ID). |
slack.status
Slack status
Whether this server has a Slack app configured, whether this organization has connected a workspace, which channel notifications go to, and whether the caller's own Slack account is linked. Never returns the bot token.
Aucun paramètre.
slack.test
Test the Slack connection
Post "PTD connected" into the configured channel with the stored bot token, so the install, the token and the channel are all proven at once.
Aucun paramètre.
slack.unlink
Unlink my Slack account
Forget every Slack identity bound to the calling PTD user. Their slash commands stop working until they link again.
Aucun paramètre.
stats
Organization stats
KPI roll-up for the whole organization: task counts by status, counts by priority band (critical 75-100, high 50-74, medium 25-49, low 0-24), overdue work, app and stream inventory, human vs agent seats, agent minutes/tokens/dollars (all-time and last 7 days), and the 20 most recent task events made by agents.
Aucun paramètre.
stream.attach_app
Attach an app to a stream
Allow cards in this lane to be filed against the given app. Idempotent.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| streamId | integer | oui | Stream id, from stream.list. |
| appId | integer | oui | App id, from app.list. |
stream.create
Create stream
Open a new swim-lane. Optionally attach the apps whose work will be filed under it; a card may only point at an app its stream owns.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| name | string | oui | Lane name. |
| color | string | null | non | Lane colour, e.g. #8a3324 or an hsl triple |
| appIds | array<integer> | non | Apps to attach immediately |
stream.detach_app
Detach an app from a stream
Stop filing this lane's cards against the app. Any card in the lane still pointing at it has its appId cleared.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| streamId | integer | oui | Stream id, from stream.list. |
| appId | integer | oui | App id, from app.list. |
stream.list
List streams
Every work stream (swim-lane) in the organization with its colour, position, attached apps, agent budget and card counts. Cards with no stream are reported separately as `unstreamed`.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| includeArchived | boolean | non | Include archived streams (default true) |
stream.move_tasks
Move every card between two streams
Move all cards from one lane to another — this is also how you merge two lanes. Pass null on either side to mean 'the cards with no stream'. A card whose app is not attached to the target lane has its appId cleared and that is reported back.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| fromStreamId | integer | null | oui | Source lane, or null for unstreamed cards |
| toStreamId | integer | null | oui | Target lane, or null to unfile the cards |
stream.rename
Rename stream
Rename a swim-lane. Writes one stream_renamed history row per card in the lane so a card's own history explains the new label.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| streamId | integer | oui | Stream id, from stream.list. |
| name | string | oui | New lane name. |
stream.set_budget
Set a stream's agent budget
The monthly ceiling on agent spend in one stream, and what happens when it is reached. `alert` (the default) is the behaviour PTD has always had: the Overview bar turns red and the digest says so, but nothing stops. `enforce` makes it a wall — once month-to-date agent spend in that lane reaches the budget, `next_task` stops offering the lane's cards to agent credentials, a `budget.exhausted` webhook fires (once per stream per day), and `budget.check` answers `blocked: true`. Humans are never blocked. Spend counts the verified cost of a session where one exists and the agent's self-reported cost otherwise, so under-reporting cannot buy extra runway. Pass agentBudgetUsd: null to remove the ceiling; enforce mode with no ceiling enforces nothing.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| streamId | integer | oui | Stream id, from stream.list. |
| agentBudgetUsd | number | null | non | Monthly ceiling in USD, or null to remove it. |
| budgetMode | enum: "alert" | "enforce" | non | alert = warn only (default). enforce = refuse agent work once spent. |
stream.systemic
Systemic streams
Streams whose work crosses several apps at once — the cross-cutting concerns worth fixing at the platform level rather than app by app.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| minApps | integer | non | Minimum number of apps a stream must touch (default 2). |
stream.totals
Minutes and agent spend per stream
Organization-wide time per stream, split human vs agent, with the agent tokens and dollars each stream consumed in the window. `overBudget` is true when the stream has an agentBudgetUsd and agent cost in the window has passed it.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| from | string | non | Count only sessions that started at or after this instant as an ISO-8601 datetime (or YYYY-MM-DD for midnight local). |
| to | string | non | Count only sessions that started at or before this instant as an ISO-8601 datetime (or YYYY-MM-DD for midnight local). |
stream.update
Update stream
Change a lane's colour, archive state, board position or monthly agent budget in USD.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| streamId | integer | oui | Stream id, from stream.list. |
| color | string | null | non | Lane colour, or null to clear it. |
| archived | boolean | non | Archive hides the lane without deleting its cards. |
| position | integer | non | Lane order on the board, ascending |
| agentBudgetUsd | number | null | non | Spend ceiling for agent work in this lane |
| customerId | integer | null | non | Customer this lane is billed to (null to unbill) |
task.attachment_delete
Delete an attachment
Detach a file from its card. The uploader may always delete it; manager and above may delete anyone's. The stored bytes are removed once no other card in the organization references the same content.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| attachmentId | integer | oui | Attachment id, from task.attachment_list |
task.attachment_list
List task attachments
Files attached to one card: filename, MIME type, size in bytes, sha256, who uploaded it, and the URL to download it from (`/api/plan/attachments/:id`). Upload with `PUT /api/plan/tasks/:id/attachments?filename=…`.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| taskId | integer | oui | Task id |
task.comment_add
Comment on a task
Add a comment to any card in the organization. The body is markdown-lite — **bold**, _italic_, `code` and links — stored as written and sanitised when it is rendered. Writes one `updated` history row noted "commented" and fires a `task.commented` webhook.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| taskId | integer | oui | Task id |
| body | string | oui | Markdown-lite text. Bold, italic, inline code, autolinked URLs and [text](url) links are rendered; everything else shows as written |
task.comment_delete
Delete a comment
Remove a comment. Its author may always delete it; manager and above may delete anyone's.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| commentId | integer | oui | Comment id, from task.comment_list |
task.comment_list
List task comments
Every comment on one card, oldest first, with each author's display name and whether they are an agent.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| taskId | integer | oui | Task id |
task.complete
Mark task complete
Strike a card off the active board. A member may only complete a card assigned to themselves; manager and above may complete any card in the organization.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| taskId | integer | oui | Task id |
| note | string | non | Why / what shipped — stored on the history row |
task.create
Create task
Draft a new card. Without a startDate it goes to the backlog; with one it is scheduled as in-progress and its dependents cascade forward. priorityScore is derived from urgency×impact/effort.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| title | string | oui | Card title. |
| description | string | non | HTML from the card editor, or plain text |
| streamId | integer | non | Swim-lane the card belongs to |
| appId | integer | non | Product/app the work lands in — must be attached to streamId when both are given |
| externalKey | string | non | Stable id from the source system; unique per organization |
| estimatedDuration | integer | non | Working length in days — the width of the Gantt bar |
| startDate | string | non | Set it and the card lands on the timeline as in-progress; omit it and the card stays in the backlog |
| dueDate | non | Hard deadline pin, independent of the duration | |
| dependencies | array<integer> | non | Task ids that must finish first |
| assignedTo | integer | non | Org member (human or agent) who owns the card |
| urgency | integer | non | Urgency on a 0–10 scale |
| impact | integer | non | Impact on a 0–10 scale |
| effort | integer | non | Effort on a 0–10 scale |
| tags | array<string> | non | Labels on the card. |
| status | enum: "backlog" | "triaged" | "in-progress" | "completed" | "wontfix" | non | Overrides the startDate-derived default |
task.custom_values
Custom field values in bulk
The `custom` bag for many cards at once, as `{ " ": { key: value } }`. What a table with custom-field columns needs — `task.get` per row would be one request per card. Omit taskIds for every card in the organization.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| taskIds | array<integer> | non | Cards to read (default: all cards in the organization) |
task.delete
Delete task
Remove a card for good. Any card that depended on it has the reference stripped from its dependency list, so the graph stays consistent. Prefer task.complete for finished work — this is not reversible.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| taskId | integer | oui | Task id |
task.find_or_create
Find or create a task by external key
Idempotent entry point for integrations and agents: returns the card whose externalKey matches inside this organization, or creates it in the backlog. Call it twice with the same externalKey and you get the same card back.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| title | string | oui | Used only when the card has to be created |
| externalKey | string | oui | Stable id from the source system, e.g. JIRA-1234 or a GitHub issue URL |
| streamId | integer | non | Stream to file a newly created card under |
task.get
Get one task
A single card with its stream, app, assignee, expanded dependencies, the cards that depend on it, and whether it is currently blocked.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| taskId | integer | oui | Task id |
task.history
Task history
Append-only audit log for one card: who changed what, when, and through which surface (web, mcp, slack, api, import). Most recent first.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| taskId | integer | oui | Task id |
| limit | integer | non | Max rows (default 50) |
task.list
List tasks
Tasks in the organization, newest-priority first. Filter by status, stream, app or assignee. Completed cards are excluded unless includeCompleted is true.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| status | enum: "backlog" | "triaged" | "in-progress" | "completed" | "wontfix" | non | Exact status filter |
| streamId | integer | null | non | Stream id, or null for cards with no stream |
| appId | integer | null | non | App id, or null for cards with no app |
| assignedTo | integer | null | non | Assignee user id, or null for unassigned cards |
| includeCompleted | boolean | non | Include completed cards (default false) |
task.recur_list
List recurring tasks
Every recurrence in the organization with its rule, a human reading of it, when it next fires and when it last did. Soonest first.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| includeInactive | boolean | non | Include cleared recurrences (default false) |
task.recur_set
Set a task's recurrence
Turn a card into a template that clones itself into a new backlog card on a schedule, or pass rule: null to stop it. Grammar: `daily`, `weekdays`, `weekly:mon,wed`, `monthly:15`, `every:3d`, `every:2w`, each optionally with `at:09:00`. Times are UTC. The clone copies title, description, stream, app, assignee, estimate, tags, priority inputs and custom values, and takes the external key ` - `.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| taskId | integer | oui | Task id |
| rule | string | null | oui | A rule such as `weekly:mon,wed at:09:00`, or null to clear the recurrence |
task.schedule
Schedule task
Put a card on the timeline at a start date (optionally setting its duration), promote it out of the backlog, and cascade its dependents forward.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| taskId | integer | oui | Task id |
| startDate | string | oui | ISO 8601 date, e.g. 2026-03-01 or 2026-03-01T00:00:00Z |
| estimatedDuration | integer | non | Days — sets the bar width at the same time |
task.set_assignee
Set task assignee
Give a card to an org member — human or agent — or pass userId: null to unassign. The target must hold a membership in this organization; call org.members for valid ids.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| taskId | integer | oui | Task id |
| userId | integer | null | oui | Member user id, or null to unassign |
task.set_custom
Set a task's custom fields
Write custom field values on one card, keyed by field key. Each value is validated against its field's kind (number, date, select, multiselect, checkbox, url, text); null clears one. A member may only write to a card assigned to them; manager and above may write to any card.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| taskId | integer | oui | Task id |
| values | object | oui | `{ fieldKey: value }`. A select takes one of its options, a multiselect an array of them, a checkbox true/false, a date an ISO day; null clears the value |
task.set_dependencies
Set task dependencies
Replace a card's dependency list. Every id must be a task in this organization, cycles are rejected, and dependents cascade forward afterwards.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| taskId | integer | oui | Task id |
| dependencies | array<integer> | oui | Complete replacement list — pass [] to clear |
task.set_priority
Set task priority
Re-score a card. Passing manualScore pins priorityScore and flips prioritySource to 'manual'; otherwise the score is recomputed as urgency×impact/effort (clamped 0–100) with prioritySource 'formula'.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| taskId | integer | oui | Task id |
| urgency | integer | non | Urgency on a 0–10 scale |
| impact | integer | non | Impact on a 0–10 scale |
| effort | integer | non | Effort on a 0–10 scale |
| manualScore | integer | null | non | Override the formula; null drops an existing override |
| note | string | non | Why this priority — stored on the card as priorityNote |
task.suggest_priority
Suggest a priority
Ask the configured model for urgency, impact and effort on one card, with a short rationale and a confidence. The model sees the card (title, description, stream, app, dates, dependencies, assignee kind, status, tags, current score) and this organization's score distribution, so its numbers mean the same thing as the rest of the backlog. Read-only by default: it returns the proposal, the score PTD's formula derives from it, the delta against the current score and what the call cost. Pass apply:true to write it (prioritySource becomes 'ai', the rationale becomes the card's priorityNote, and one priority_changed event is recorded). A card whose score a human set by hand (prioritySource 'manual') is never written over unless you also pass overrideManual:true.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| taskId | integer | oui | Task id |
| apply | boolean | non | Write the suggestion onto the card (default false — just propose). |
| overrideManual | boolean | non | Allow apply to overwrite a score a human set by hand. Ignored without apply. |
task.suggest_priority_batch
Suggest priorities in bulk
Re-score up to 25 open cards in one go, optionally narrowed to one stream or app, highest-scored first. Runs a few calls at a time rather than all at once, so a big batch does not trip the provider's rate limit. Cards a human scored by hand are skipped without spending a call unless overrideManual is set. Returns one row per card — proposal, derived score, delta, whether it was written — plus the total tokens and dollars the run cost. One card failing is a row in the report, not the end of the batch.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| streamId | integer | non | Only cards in this stream. |
| appId | integer | non | Only cards filed against this app. |
| limit | integer | non | How many cards to score, 1–25 (default 10). |
| apply | boolean | non | Write every suggestion (default false — dry run). |
| overrideManual | boolean | non | Include cards scored by hand, and allow apply to overwrite them. |
task.totals
Minutes per task, split human vs agent
Time booked against tasks, split by who did the work: human minutes on one side, agent minutes with their tokens and API cost on the other. Breaks and still-running entries are excluded. Always returns an array — a named taskId returns exactly one row, zeroed when nothing has been logged yet.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| taskId | integer | non | One task. Returns a single-element array. |
| streamId | integer | non | Every task in this stream. |
| from | string | non | Count only sessions that started at or after this instant as an ISO-8601 datetime (or YYYY-MM-DD for midnight local). |
| to | string | non | Count only sessions that started at or before this instant as an ISO-8601 datetime (or YYYY-MM-DD for midnight local). |
task.unschedule
Unschedule task
Take a card off the timeline and back into the backlog. Its due date, if any, is kept — only the start date is cleared.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| taskId | integer | oui | Task id |
task.update
Update task
Patch any subset of a card's fields. Cascades every dependent forward when startDate, estimatedDuration, dueDate or dependencies change; rejects dependency cycles; keeps a manual/ai priority score unless you go through task.set_priority.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| taskId | integer | oui | Task id |
| title | string | non | New title. |
| description | string | null | non | Replacement body, HTML or plain text, or null to clear it. |
| status | enum: "backlog" | "triaged" | "in-progress" | "completed" | "wontfix" | non | Workflow status. |
| streamId | integer | null | non | null detaches the card from its stream |
| appId | integer | null | non | Must be attached to the card's stream; null clears it |
| externalKey | string | null | non | Stable id from the source system, or null to clear it. |
| estimatedDuration | integer | null | non | Working length in days, or null to clear it. |
| startDate | string | null | non | null unschedules the card back to the backlog |
| dueDate | null | non | ISO 8601 date, e.g. 2026-03-01 or 2026-03-01T00:00:00Z |
| dependencies | array<integer> | non | Replaces the list; cycles are rejected |
| assignedTo | integer | null | non | Member who owns the card, or null to unassign. |
| urgency | integer | non | Urgency on a 0–10 scale |
| impact | integer | non | Impact on a 0–10 scale |
| effort | integer | non | Effort on a 0–10 scale |
| tags | array<string> | non | Replacement list of labels. |
| completed | boolean | non | true marks the card complete. |
tasks_by_assignee
Tasks grouped by assignee
Roster view: every member of the organization — humans and agents alike — with the cards they currently own, plus the unassigned pile.
Aucun paramètre.
tasks.query
Query tasks
Filter, sort and page the backlog server-side. Returns { items, total } so a caller can page without re-counting. Completed and wontfix tasks are hidden unless includeCompleted is true or an explicit status list asks for them. For streamId, appId and assignedTo, omitting the key means "no filter" while null (or the string "none") means "filed against nothing" — the same convention the Plan surface's task.list uses.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| search | string | non | Case-insensitive substring of the title or description. |
| streamId | integer | string | null | non | Stream id, or null / "none" for tasks filed against no stream. |
| appId | integer | string | null | non | App id, or null / "none" for tasks filed against no app — which is where cards land when a stream is detached from an app. |
| status | array<enum: "backlog" | "triaged" | "in-progress" | "completed" | "wontfix"> | non | Explicit status whitelist; overrides includeCompleted. |
| assignedTo | integer | string | string | null | non | User id, "me" for the caller, or null / "none" for unassigned tasks. |
| priorityMin | integer | non | Lowest priorityScore to include (0-100). |
| priorityMax | integer | non | Highest priorityScore to include (0-100). |
| effortMax | integer | non | Only tasks costing at most this much effort (0-10). |
| tags | array<string> | non | Match tasks carrying ANY of these tags. |
| includeCompleted | boolean | non | Include completed and wontfix tasks (default false). |
| sort | enum: "priority" | "due" | "updated" | "title" | non | priority (default), due, updated or title. |
| order | enum: "asc" | "desc" | non | Sort direction; defaults to desc for priority/updated, asc for due/title. |
| limit | integer | non | Page size, max 200 (default 25). |
| offset | integer | non | Rows to skip (default 0). |
teams.connect
Connect Microsoft Teams
Store the secret Teams showed when the Outgoing Webhook was created. That secret is the whole credential: it verifies every `Authorization: HMAC …` header AND identifies this organization, since an Outgoing Webhook delivery carries nothing else worth trusting. It is sealed at rest and never shown again.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| secret | string | oui | The base64 secret Teams displayed once, when the Outgoing Webhook was created |
| teamName | string | non | Which Teams team this is, for the Org UI |
teams.disconnect
Disconnect Microsoft Teams
Destroy the stored secret: `@PTD …` commands from that team stop being recognised. Members keep their link records, so re-connecting a new Outgoing Webhook picks up where it left off. Delete the webhook in Teams too, or it will keep posting to a URL that now refuses it.
Aucun paramètre.
teams.link_code
Mint a Teams link code
A six-character one-time code, valid for ten minutes, that binds a Teams account to the calling PTD user. Send `@PTD link ` in the team to spend it. Minting a new code invalidates the caller's previous one.
Aucun paramètre.
teams.status
Microsoft Teams status
Whether this organization has connected a Teams Outgoing Webhook, which team it is, and whether the caller's own Teams account is linked. Never returns the webhook secret — it is sealed with AES-256-GCM at rest.
Aucun paramètre.
teams.unlink
Unlink my Teams account
Forget every Teams identity bound to the calling PTD user. Their commands stop working until they link again.
Aucun paramètre.
telegram.disconnect
Switch Telegram off
Turn the bot off for this organization: link codes stop being minted and DMs stop. Members keep their link records, and the bot itself keeps serving any other organization on this server — so the webhook is left registered unless `deleteWebhook` is asked for explicitly.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| deleteWebhook | boolean | non | Also unregister the webhook with Telegram. This affects EVERY organization on this server. |
telegram.link_code
Mint a Telegram link code
A six-character one-time code, valid for ten minutes, that binds a Telegram account to the calling PTD user. Send `/link ` to the bot to spend it. Minting a new code invalidates the caller's previous one.
Aucun paramètre.
telegram.register_webhook
Register the Telegram webhook
Point the bot at this deployment with `setWebhook`, and switch Telegram on for this organization. The URL carries a secret derived from PTD_SECRET_KEY and the bot token, so it is unguessable and rotates with either of them. One bot serves every organization on this server: registering it again from another organization is harmless and simply re-points the same bot here.
Aucun paramètre.
telegram.status
Telegram status
Whether this server has a bot token, whether this organization has switched the bot on, the bot's @username, and whether the caller's own Telegram account is linked. Never returns the bot token or the webhook secret.
Aucun paramètre.
telegram.unlink
Unlink my Telegram account
Forget every Telegram identity bound to the calling PTD user. Their commands stop working until they link again.
Aucun paramètre.
telegram.webhook_info
Telegram webhook info
What Telegram itself thinks the webhook is: the URL it delivers to, how many updates are queued, and the last delivery error it saw. The fastest way to tell a wrong PTD_BASE_URL from a firewall.
Aucun paramètre.
telemetry.ping
Send one install ping now
Post the four-field payload once, immediately, instead of waiting for the weekly timer. Refused with `telemetry-disabled` while the toggle is off — there is no path in PTD that pings without an explicit opt-in. Returns the exact payload that was sent and the receiver's status code; a network failure is reported, not thrown.
Aucun paramètre.
telemetry.set
Set the telemetry preferences
Turn the weekly install ping and the update check on or off, independently. The ping posts four fields to the shared receiver, which hashes (client IP, installation id) under a weekly-rotating salt and keeps only the hash; the update check is a bare GET against the public releases feed and sends nothing at all. Either call also records that the question has been answered, which retires the first-run prompt. `PTD_TELEMETRY=0` or `=1` in the environment outranks the stored ping toggle.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| telemetryEnabled | boolean | non | true = post the weekly ping. Off by default. |
| updateChecksEnabled | boolean | non | true = GET the public releases feed. Off by default. Sends no payload. |
| dismissed | boolean | non | Answer the question without changing either toggle — what dismissing the first-run prompt does. |
telemetry.status
Installation telemetry status
Whether this installation submits the weekly anonymous install ping and whether it checks for updates — both off unless someone turned them on — together with the exact four-field JSON that would be sent, the six ready-to-paste offline submission formats for an egress-restricted host, and the receiver's retention policy. Reading this sends nothing.
Aucun paramètre.
template.create
Save an entry template
Save a recurring entry — a stream, a customer, a note and an icon — so it can be started with one tap.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| name | string | oui | What it is called on the tile. |
| icon | string | non | Icon slug (coffee, lunch, gym, commute, walk, call, read, rest, game, errand, outside, smoke, travel, think, partner, kids, other). |
| notes | string | non | Note copied onto every entry started from this template. |
| streamId | integer | non | Stream the template attaches to. |
| customerId | integer | non | Customer the template attaches to. Defaults to the stream's customer. |
| isBreak | boolean | non | Makes it a break tile rather than a work stencil. |
template.delete
Delete an entry template
Remove one of the caller's own templates. Entries already started from it are untouched.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| templateId | integer | oui | The template to remove. |
template.list
List entry templates
The caller's own saved entry templates — one-tap starts for recurring work and the break tiles.
Aucun paramètre.
time_entry.approve
Approve hours
Sign off entries so they can be invoiced. Name the entries, or a member and a window to approve the lot. Who approved and when are written from your credential, not from the request. Entries already frozen into an invoice are refused rather than silently skipped, because approving them would change nothing.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| entryIds | array<integer> | non | The entries to act on. Use this or userId + from + to. |
| userId | integer | non | Act on this member's entries in the window instead of naming ids. |
| from | string | non | Start of the window as an ISO-8601 datetime (or YYYY-MM-DD for midnight local). |
| to | string | non | End of the window as an ISO-8601 datetime (or YYYY-MM-DD for midnight local). |
time_entry.attest
Attest an entry's usage
Record what a finished agent session *actually* consumed, as measured by something other than the agent's own arithmetic. Writes verifiedTokens / verifiedCostUsd / verifiedSource / verifiedAt; the agent's self-reported tokensUsed and apiCostUsd are left untouched, so `usage.summary` can put the claim and the evidence side by side. `source` says who measured it: `claude_code_hook` (the Stop hook summed the session transcript), `ci` (a build reported the runner's usage), `provider` (reconciled against the provider's billing). `costUsd` is optional — omit it and, when `evidence` names a `model`, PTD prices the tokens itself from its own table (cache reads at 0.1× and cache writes at 1.25× the input rate); with neither, the tokens are verified and the cost is left unset rather than stored as zero. Members may attest their own entries, manager and above anyone's. Only agent-sourced, already-closed entries can be attested, and re-attesting replaces the previous figure (so a hook that fires twice is harmless) while the task history keeps both.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| entryId | integer | oui | The finished agent entry to attest — the `entry.id` time_entry.stop returned. |
| tokens | integer | oui | Total tokens the session consumed, counting input, output and cache traffic. |
| costUsd | number | non | USD cost, if the attester knows it. Omitted, PTD derives it from evidence.model. |
| source | enum: "claude_code_hook" | "ci" | "provider" | oui | Who measured this: claude_code_hook, ci or provider. |
| evidence | object | non | Free-form proof. Keys PTD reads: `model` (to price the tokens), `inputTokens`/`outputTokens`/`cacheReadTokens`/`cacheCreationTokens` (or their snake_case spellings) for an accurate price, and `cacheTtl` ("5m"|"1h"). Everything else — transcriptSha256, turns, runId, commit — is stored on the task-hi… |
time_entry.current
What is running
The caller's open entry with the minutes elapsed so far, or null when the clock is at rest.
Aucun paramètre.
time_entry.delete
Strike an entry
Remove an entry from the ledger for good. Own entries for a member; any entry in the organization for manager and above. An entry frozen into a certified invoice cannot be struck — void the invoice first, which releases it.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| entryId | integer | oui | The entry to strike. |
time_entry.list
List entries
Ledger lines, newest first, with the stream / task / customer they point at and their source. A member sees their own; manager and above may pass another member's userId, or the string "all" for the whole organization.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| from | string | non | Only entries that started at or after this instant as an ISO-8601 datetime (or YYYY-MM-DD for midnight local). |
| to | string | non | Only entries that started at or before this instant as an ISO-8601 datetime (or YYYY-MM-DD for midnight local). |
| taskId | integer | non | Only entries attributed to this task |
| streamId | integer | non | Only entries attributed to this stream |
| userId | integer | string | non | Whose entries to read. Manager and above only; "all" reads every member's. |
| limit | integer | non | Maximum lines to return (default 200). |
time_entry.log_past
Log a finished session
Insert an already-finished entry with explicit checkIn and checkOut — how an agent records work it did before it got round to reporting. checkOut must be after checkIn and the span at most 24 hours. Tokens and cost are stored only if the calling credential is an agent's.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| checkIn | string | oui | When the session started as an ISO-8601 datetime (or YYYY-MM-DD for midnight local). |
| checkOut | string | oui | When the session ended as an ISO-8601 datetime (or YYYY-MM-DD for midnight local). |
| taskId | integer | non | Task to attribute the work to. Its stream (and that stream's customer) are adopted when you do not name them. |
| streamId | integer | non | Stream (swim-lane) to attribute the work to. |
| customerId | integer | non | Customer to bill the work to. Defaults to the stream's customer. |
| notes | string | non | Free-text note shown on the ledger line. |
| tokensUsed | integer | non | Model tokens this session consumed. Stored only when the entry's source is 'agent' — ignored, and reported back in `ignored`, for human sessions. |
| apiCostUsd | number | non | API cost of this session in USD. Stored only when the entry's source is 'agent'. |
| isBreak | boolean | non | Record it as a break rather than work. |
time_entry.pending
Hours waiting for approval
Every entry in the organization waiting for a manager's signature, oldest first, with who logged it and how long it ran. A member sees only their own. This is the queue behind the approval chips on the ledger.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| userId | integer | non | Only this member's pending entries. |
| limit | integer | non | Maximum rows (default 200). |
time_entry.reject
Reject hours
Send entries back with a reason: they become `rejected` and stop counting towards an invoice until the member corrects and resubmits them. The reason is recorded in the organization's audit trail rather than overwriting the member's own note on the line.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| entryIds | array<integer> | oui | The entries to send back. |
| reason | string | oui | Why they are being rejected. The member sees it in the audit trail. |
time_entry.start
Start the timer
Open a time entry now, attributed to the caller. Refuses to open a second session while one is running — stop it first, or pass isBreak:true, which cuts the running session and opens the break in its place. Whether the entry reads as human or agent work is decided by the credential you called with, not by any argument.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| taskId | integer | non | Task to attribute the work to. Its stream (and that stream's customer) are adopted when you do not name them. |
| streamId | integer | non | Stream (swim-lane) to attribute the work to. |
| customerId | integer | non | Customer to bill the work to. Defaults to the stream's customer. |
| notes | string | non | Free-text note shown on the ledger line. |
| isBreak | boolean | non | Log a break (recess) instead of work. A break also cuts any running work session. |
time_entry.stop
Stop the timer
Close the caller's open entry. An agent may report the tokens and API cost the session consumed; on a human session those two fields are dropped and named in `ignored`, because cost and tokens only mean something for agent work.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| tokensUsed | integer | non | Model tokens this session consumed. Stored only when the entry's source is 'agent' — ignored, and reported back in `ignored`, for human sessions. |
| apiCostUsd | number | non | API cost of this session in USD. Stored only when the entry's source is 'agent'. |
| notes | string | non | Replaces the entry's note, e.g. what the session actually achieved. |
time_entry.submit
Submit your hours
Hand a window of your own finished entries to a manager for approval: every closed, non-break entry of yours in the range that is not already approved or invoiced moves to `pending`. This is what an external contractor does at the end of a month; entries that are already approved are left alone, and rejected ones go back to pending so a corrected line can be looked at again.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| from | string | oui | Start of the window to submit as an ISO-8601 datetime (or YYYY-MM-DD for midnight local). |
| to | string | oui | End of the window to submit as an ISO-8601 datetime (or YYYY-MM-DD for midnight local). |
time_entry.switch_break
Cut to a break
Close whatever is running and open a break in one step — the behaviour of a break tile in the UI. Name a saved break template with templateId, or pass a free-text label.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| templateId | integer | non | One of your own entry templates; its note and attachments are copied onto the break. |
| label | string | non | Free-text note for the break when you have no template. Required when you pass no templateId. |
time_entry.update
Correct an entry
Fix the times, attachments or note of an entry. Members may correct their own lines; manager and above may correct anyone's in the organization. Attribution is deliberately not editable: entry_source, agentLabel, tokensUsed and apiCostUsd cannot be changed after the fact, so the human-vs-agent record cannot be rewritten. An entry already frozen into a certified invoice is refused outright — void the invoice first.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| entryId | integer | oui | The entry to correct. |
| checkIn | string | non | New start as an ISO-8601 datetime (or YYYY-MM-DD for midnight local). |
| checkOut | string | non | New end (pass to close a running entry retroactively) as an ISO-8601 datetime (or YYYY-MM-DD for midnight local). |
| taskId | integer | non | Task to attribute the work to. Its stream (and that stream's customer) are adopted when you do not name them. |
| streamId | integer | non | Stream (swim-lane) to attribute the work to. |
| customerId | integer | non | Customer to bill the work to. Defaults to the stream's customer. |
| notes | string | non | Free-text note shown on the ledger line. |
today_summary
Today's page
The caller's day so far: worked minutes by stream and by source, break minutes, and whatever is still running.
Aucun paramètre.
upcoming_due
Upcoming deadlines
Open cards whose due date — or computed end (startDate + duration) — falls within the next N days. Defaults to a week. Overdue cards are included and flagged.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| days | integer | non | Horizon in days (default 7) |
usage.connect_provider
Connect a provider admin key
Store an organization-level admin key so PTD can read the provider's own usage and cost reports and compare them with the ledger. Anthropic wants an Admin API key (`sk-ant-admin…`, Console → Settings → Admin keys); OpenAI wants an admin key with the usage scope. The key is sealed with AES-256-GCM (PTD_SECRET_KEY) and is never returned by any action — `keyHint` is its last four characters. Admin only, and deliberately so: reconciliation is only evidence because the agents being measured cannot reach the credential doing the measuring. `baseUrl` exists for a proxy or a local stub; leave it unset for the real provider.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| provider | enum: "anthropic" | "openai" | oui | Which provider's billing to read: anthropic or openai. |
| adminApiKey | string | oui | The admin key. Stored sealed; never echoed back. |
| baseUrl | string | non | Override the provider host (proxy or test stub). Default api.anthropic.com / api.openai.com. |
usage.disconnect_provider
Disconnect a provider key
Forget the stored admin key for one provider. Past reconciliations are kept — they are evidence — but no new one can be run until a key is connected again.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| provider | enum: "anthropic" | "openai" | oui | Which provider's billing to read: anthropic or openai. |
usage.price
Price a token split
What PTD thinks a set of token counts costs, using the same table `time_entry.attest` prices an attestation with. Exists so a hook or a CI job can report a dollar figure on `time_entry.stop` that matches the one the server will derive on attestation, instead of shipping a second price table inside a shell script. Read-only, no database. An unknown model comes back `priced: false` with a zero cost — never a guess.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| model | string | oui | Model id, e.g. claude-opus-5 or gpt-4o-mini. |
| inputTokens | integer | non | Uncached input tokens. |
| outputTokens | integer | non | Output tokens. |
| cacheReadTokens | integer | non | Tokens read from cache. |
| cacheCreationTokens | integer | non | Tokens written to cache. |
| cacheTtl | enum: "5m" | "1h" | non | TTL of the cache writes: 5m costs 1.25× input, 1h costs 2×. Default 5m. |
usage.providers
Connected providers
Both providers with whether a key is connected, its last four characters, who connected it and when. Never the key itself.
Aucun paramètre.
usage.reconcile
Reconcile against the provider
Fetch the provider's own usage and cost report for a period and compare it with what the agents booked into the ledger. Stores and returns one `usage_reconciliations` row: `status` is `match` (inside tolerance — 5% of the provider's figure or 10,000 tokens, whichever is larger), `under_reported` (the provider billed for more than the ledger accounts for), `over_reported` (the ledger claims more than the provider billed) or `unavailable` (the provider could not be read). `detail` carries the gap, the tolerance applied, the attestation coverage, the per-model provider breakdown, the per-agent split and a note on how to read the status — the two totals are not commensurable to the token (a provider bill includes keys PTD never sees), so the verdict is a signal to look, not an accusation. Admin only.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| provider | enum: "anthropic" | "openai" | oui | Which provider's billing to read: anthropic or openai. |
| from | string | oui | Start of the period as an ISO-8601 datetime (or YYYY-MM-DD for midnight local). |
| to | string | oui | End of the period as an ISO-8601 datetime (or YYYY-MM-DD for midnight local). |
usage.reconciliations
Reconciliation history
Past reconciliations, newest first: period, provider, both token totals, both cost totals, the verdict and its detail. Manager and above — it is a read of evidence, not a credential.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| provider | enum: "anthropic" | "openai" | non | Which provider's billing to read: anthropic or openai. |
| limit | integer | non | Rows to return (default 20). |
usage.summary
Reported versus verified usage
Whether this organization's agent-cost figures can be trusted, as arithmetic. For a window (default the last 30 days) it returns: `totals` and `byAgent` / `byStream` rows each carrying `reported` (what the agents said), `verified` (what a hook, a build or the provider proved), `delta` (verified − reported, so a positive number means under-reporting), `unverified` (self-reported spend nobody has attested) and `coveragePct` (attested sessions as a share of agent sessions); `discrepancies`, one line per session whose gap exceeds tolerance (5% of the verified figure, or 1000 tokens, whichever is larger), each with a direction; and `narrative`, one computed sentence. Breaks and still-running sessions are excluded — neither has a final usage figure. Manager and above, because it puts every seat's spend on one page.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| from | string | non | Start of the window as an ISO-8601 datetime (or YYYY-MM-DD for midnight local). |
| to | string | non | End of the window as an ISO-8601 datetime (or YYYY-MM-DD for midnight local). |
webhook.create
Create webhook
Subscribe a URL to task events. Each delivery is a JSON body {event, orgId, taskId, actor, payload, ts} with an `X-PTD-Signature: sha256= ` header. A secret is generated when you omit one and shown exactly once.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| url | string | oui | Absolute http(s) endpoint to POST to. |
| secret | string | non | HMAC key. Generated when omitted; returned once either way. |
| events | array<string> | non | Event kinds to receive, or ["*"] for all (the default). Task kinds carry a taskId and a {old,new} diff: task.created, task.updated, task.completed, task.assigned, task.priority_changed, task.scheduled, task.unscheduled, task.cascade_shifted, task.stream_moved, task.deleted. Stream kinds have no tas… |
webhook.delete
Delete webhook
Remove a webhook subscription. Deliveries stop immediately.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| id | integer | oui | Webhook id, from webhook.list. |
webhook.list
List webhooks
Outgoing webhook subscriptions for this organization. Secrets are never returned — only whether one is set.
Aucun paramètre.
webhook.test
Test webhook
Deliver a signed `ping` envelope through the real delivery path and report the HTTP status, so you can confirm the endpoint and the signature before relying on it.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| id | integer | oui | Webhook id, from webhook.list. |
whoami
Who am I
Identity, organization and role of the caller, plus whether it authenticated as a human or an agent.
Aucun paramètre.
Compatibilité clients
Selon les transports que chaque client déclare accepter dans sa documentation officielle ; ce n’est pas un essai réel dans le client.
| Client | Transports documentés | Ce serveur | Source |
|---|---|---|---|
| Claude Code | stdio Streamable HTTP SSE | transport accepté | doc |
| Claude (claude.ai, Claude Desktop, Cowork) | stdio Streamable HTTP SSE | transport accepté | doc |
| ChatGPT (serveurs MCP personnalisés / plugins) | Streamable HTTP SSE | transport accepté | doc |
| Cursor | stdio Streamable HTTP SSE | transport accepté | doc |
| VS Code (GitHub Copilot) | stdio Streamable HTTP SSE | transport accepté | doc |
| Windsurf (documentation redirigée vers Devin Local / Devin CLI) | stdio Streamable HTTP SSE | transport accepté | doc |
| Gemini CLI | stdio Streamable HTTP SSE | transport accepté | doc |
| OpenAI Codex (CLI, extension IDE, app) | stdio Streamable HTTP | transport accepté | doc |
Configs prêtes à copier
Adresse distante utilisée : https://ptd.foor.tech/mcp. Formats repris de la documentation de chaque client.
claude mcp add --transport http ptd https://ptd.foor.tech/mcpCustomize > Connectors > + Add > Add custom connector ; Name : ptd ; URL : https://ptd.foor.tech/mcpchatgpt.com/plugins > + > Add custom MCP server ; Name : ptd ; Server URL : https://ptd.foor.tech/mcp ; Create as a plugin{
"mcpServers": {
"ptd": {
"url": "https://ptd.foor.tech/mcp"
}
}
}{
"mcpServers": {
"ptd": {
"type": "http",
"url": "https://ptd.foor.tech/mcp",
"tools": ["*"]
}
}
}{
"mcpServers": {
"ptd": {
"url": "https://ptd.foor.tech/mcp"
}
}
}{
"mcpServers": {
"ptd": {
"httpUrl": "https://ptd.foor.tech/mcp"
}
}
}[mcp_servers.ptd]
url = "https://ptd.foor.tech/mcp"Citer cette source
Vous rédigez un article ou un comparatif ? Cette fiche distingue les informations du registre et nos mesures. Citez le lien permanent et la date du test ; un résultat OK ne constitue pas un audit de sécurité ni une garantie de disponibilité.
PTD — Plan Track Done · L’Atlas · Test du
[PTD — Plan Track Done — L’Atlas](https://latlas.dev/mcp/io.github.danimoya/ptd)Source : Registre officiel MCP · relevé le 1 déc. 2026. L’Atlas n’ajoute aucune donnée qui ne vienne de cette source ou de ses propres tests.