fieldtwin
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| FIELDTWIN_AUTH | No | `oauth` makes the vendor APIs check tokens the way the real ones do | any-token |
| FIELDTWIN_HOST | No | The address to listen on. `0.0.0.0` reaches it from a container or another machine: only on a network you trust, since anyone who can reach the twin can control it | 127.0.0.1 |
| FIELDTWIN_PORT | No | The port to listen on | 4010 |
| FIELDTWIN_SEED | No | Which fake business to generate. The same seed always builds the same one | 42 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| twin_statusA | Where the test world stands: company, seed, loaded scenario, twin time, event count, auth mode, active faults, checkpoints, and the timeline entries due next. Changes nothing. Call it first to get your bearings. |
| twin_resetA | Throw away everything since the start and rebuild the seeded world (the loaded scenario's, if one is loaded), with its timeline and faults. Checkpoints go too; webhook subscriptions and the auth mode stay. To undo only part of a run, use twin_rewind. Answers with the new status. |
| twin_advance_clockA | Twin time stands still until you move it. Scheduled scenario events happen on the way, each at its own time, and the webhooks they cause are delivered to the subscribed URLs before this answers; 0 minutes only sends deliveries already due. Answers with the new twin time and how many scenario events happened. |
| twin_run_actionA | Make something happen now, as if someone did it in the vendor's own app: jobber newClients or payInvoices; housecallpro newCustomers, completeJobs, invoiceJobs, or payInvoices (quickbooks has none). Each takes params: how many. Recorded with source "control"; its webhooks are delivered before this answers. Answers with the events it recorded. |
| twin_checkpointA | Name the current moment (log position, twin time, and fault dice), to list changes since it with twin_changes or go back to it with twin_rewind. A name already taken moves to now. Answers with the checkpoint. |
| twin_changesA | What changed since a checkpoint, one line per event, oldest first: when, which vendor, what, and its source. Set onlyFromApi to see only what your code's API calls did. Changes nothing. For whole events, use twin_export_log. |
| twin_rewindA | Undo everything recorded after a checkpoint: records, twin time, and fault dice go back, so the same requests meet the same faults again. Checkpoints taken after it are dropped. Answers with the new status. |
| twin_list_scenariosA | The ready-made scenarios twin_load_scenario can load by name, and what each one tests. Changes nothing. |
| twin_load_scenarioA | Throw away the current world and build one from a scenario: a ready-made one by name (see twin_list_scenarios), or your own YAML (seed, startTime, world, faults, auth, timeline). Give one of the two. A scenario that doesn't load leaves the twin as it was. twin_reset comes back to its start. Answers with the new status. |
| twin_set_faultsA | Replace the active fault rules, so the vendor APIs fail the way real ones do. Each rule: { name, vendor: quickbooks|jobber|housecallpro, method?, pathIncludes?, pathExcludes?, rate: 0-1, effect: { status?: HTTP error status, latencyMs?, message?, lostResponse?: do the work, then answer with status } }. A rule with webhook: TOPIC or "*" (and no method, pathIncludes, or pathExcludes) affects webhook deliveries instead: effect { duplicate?: true, delayMs? }. An empty list turns faults off. Bad rules change nothing. Answers with the active rules' names. |
| twin_set_authB | How the vendor APIs treat bearer tokens: "any-token" accepts anything; "oauth" accepts only unexpired tokens from the twin's OAuth endpoints. Changes no records. Answers with the mode. |
| twin_set_webhooksA | Replace the webhook subscriptions, as an app would set them up in the vendor's developer settings. Each: { vendor: quickbooks | jobber | housecallpro, url, topics, clientId, clientSecret (signs deliveries: for Jobber the app's OAuth client secret, for QuickBooks its verifier token, for Housecall Pro its signing secret) }. quickbooks topics: qbo.customer.created.v1, qbo.customer.updated.v1, qbo.invoice.created.v1, qbo.invoice.updated.v1, qbo.payment.created.v1. jobber topics: CLIENT_CREATE, INVOICE_UPDATE. housecallpro topics: customer.created, customer.updated, job.created, job.scheduled, job.completed, job.paid, invoice.created, invoice.sent, invoice.payment.succeeded, invoice.paid. Answers as twin_webhooks does. |
| twin_webhooksA | The webhook subscriptions, without their secrets, and the latest deliveries with how each went. Changes nothing. |
| twin_export_logA | The event log as JSON Lines, one whole event per line, oldest first: everything, or only what happened since a checkpoint. Changes nothing. For a one-line summary of each, use twin_changes. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 14 tools
Most tools target clearly distinct operations (load scenario, set faults, advance clock, rewind), and descriptions actively disambiguate close pairs, e.g. twin_export_log points to twin_changes for a summary and twin_reset points to twin_rewind for partial undo. The main residual confusion is the read/write pair twin_webhooks vs twin_set_webhooks, and the three 'restore world' tools (reset, rewind, load_scenario), which descriptions clarify but which still sit close together.
Every tool uses the same 'twin_' prefix and snake_case, giving a strong shared identity. The verb position is mostly predictable (twin_set_*, twin_list_*, twin_export_*, twin_advance_*), but read-only getters break the pattern by using bare nouns (twin_status, twin_webhooks, twin_changes, twin_checkpoint), creating an asymmetry with twin_set_webhooks.
Fourteen tools is well within the sweet spot and each maps to a distinct responsibility in the simulation lifecycle: world setup, environment knobs, time control, observation, and rollback. Nothing feels padded or bolted on.
Lifecycle coverage is strong: build/load a world, configure faults, auth and webhooks, move time, trigger actions, observe via status/log/changes, and roll back via checkpoint/rewind/reset. The notable gap is there is no way to inspect the twin's actual records (customers, invoices, jobs) directly—only event streams and status—and no way to delete or list a single checkpoint.