mcp

v0.1.1
dev.postbag/mcp Checked 3 days ago Published 3 months ago

Form backend that routes: one tool per Postbag API operation, plus quickstart and explain.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

auth_providers

Which sign-in methods this instance has configured Public, unauthenticated — no API key needed. Email+password is always available. `social` lists only the OAuth providers this instance has both a client id and secret for (self-host parity: a self-hosted instance with neither configured returns an empty list). The dashboard calls this once, cached, to decide which social sign-in buttons to render.

auth_request_code

Email a 6-digit sign-in code (step 1 of agent onboarding without a browser) Public, unauthenticated. Sends a 6-digit code good for 10 minutes to the given address. Always 200 for a well-formed email, whether or not an account exists — this endpoint never confirms or denies an account's existence. Rate limited per email and per client IP. The human reads the code out of their inbox and gives it to the agent, which calls POST /v1/auth/verify-code next.

ParameterTypeDescription
email *stringLowercased and trimmed before use. Always 200s for a well-formed address.

auth_verify_code

Verify a code and mint an API key (step 2 of agent onboarding without a browser) Public, unauthenticated. Verifies the code sent by POST /v1/auth/request-code and, on success, mints an API key through the same path POST /v1/api-keys uses — default scope manage. A new email provisions a personal organization first, exactly like every other sign-up path. An existing user's key is minted against their personal organization (the one they own, oldest first, if they belong to several). This does not set a session cookie — it mints a key, it does not log a browser in.

ParameterTypeDescription
code *stringThe 6-digit code from the email.
email *string
key_namestringDefaults to "agent · <YYYY-MM-DD>".
scopesarray

me_get

Identify the caller and summarise the organization The first call an agent holding only an API key should make: who it is, which org, which scopes the key has, plan limits and usage, and what already exists (counts). Call this before anything else.

api_keys_list

List API keys for the active organization Prefixes only — full key values are never returned again after creation.

api_keys_create

Create an API key for the active organization (session only) Requires a signed-in dashboard session, not another API key — an agent cannot mint its own first key this way. The full key is only ever returned once, in this response; store it immediately.

ParameterTypeDescription
namestringA label to tell keys apart, e.g. 'CI deploy key'.
scopesarraymanage ⊇ read ⊇ submit — a manage key satisfies every read- or submit-scoped call too.

api_keys_revoke

Delete an API key Revokes the key immediately; any client still using it starts getting 401s.

ParameterTypeDescription
id *stringThe API key id (not the key value itself).

quickstart

One call to a working, routed form Creates (idempotently, by name within project) the project if missing, the form, a destination for whichever of notify_email/telegram/webhook was given, and a direct route, then returns the form, an embeddable snippet, a curl command to verify delivery, and next steps. Everything it does is also available as individual calls (POST /v1/forms, /v1/destinations, /v1/routes); this is a convenience, not a special path.

ParameterTypeDescription
name *string
notify_emailstring
originstring
projectstring
redirect_urlstring
tagsarray
telegramobject
webhookobject

projects_list

List projects

ParameterTypeDescription
cursorstring
limitinteger

projects_create

Create a project A project groups forms — one per site or app. Pass `if_exists: "return"` to make this call safe to re-run.

ParameterTypeDescription
if_existsstring
namestring
slugstring
tagsarray

projects_get

Get a project

ParameterTypeDescription
projectId *string

projects_update

Update a project

ParameterTypeDescription
projectId *string
if_existsstring
namestring
slugstring
tagsarray

projects_delete

Delete an empty project Fails with 409 while the project still has forms — delete or move them first.

ParameterTypeDescription
projectId *string

forms_list

List forms

ParameterTypeDescription
cursorstring
limitinteger
projectstringFilter to one project id.
streamstringFilter to forms attached to this stream id.
tagstringFilter to forms carrying this tag.

forms_create

Create a form Pass `from_template` (a stream id) to attach the new form to that stream with a schema copied 1:1 from it, so the mapping is trivially complete. Pass `if_exists: "return"` to make this call safe to re-run.

ParameterTypeDescription
from_templatestring
if_existsstring
namestring
projectstring
schemaobject
schema_modestring
settingsobject
slugstring
statusstring
tagsarray

forms_get

Get a form

ParameterTypeDescription
formId *string

forms_update

Update a form

ParameterTypeDescription
formId *string
from_templatestring
if_existsstring
namestring
projectstring
schemaobject
schema_modestring
settingsobject
slugstring
statusstring
tagsarray

forms_delete

Delete a form

ParameterTypeDescription
formId *string

forms_embed

Embed snippets Ready-to-paste HTML, fetch, React, Astro and Next.js server-action snippets for this form's submit URL.

ParameterTypeDescription
formId *string

forms_schema_get

Current schema version For observe-mode forms with no published version yet, falls back to the last inferred draft (marked `inferred: true`) if one exists; publishing is still a separate, explicit act.

ParameterTypeDescription
formId *string

forms_schema_publish

Publish a new schema version Schemas are immutable versions — this always creates version N+1, never mutates an existing one.

ParameterTypeDescription
formId *string
json_schema *objectJSON Schema draft 2020-12 describing the submission data. `required` drives drift detection and mapping completeness.
changelogstringA short human note on what changed in this version, shown in the version history.
uiobjectPer-field rendering hints keyed by field name (label, placeholder, widget, options, order) — used to render embed snippets.

forms_schema_versions

All schema versions

ParameterTypeDescription
formId *string

forms_schema_infer

Infer a draft schema now, from recent submissions (observe mode, no schema yet) Only for observe-mode forms with no published schema. Looks at recent non-spam submissions and produces a draft schema; call forms_schema_publish with the result (or an edited version of it) to make it real.

ParameterTypeDescription
formId *string

forms_drift

Unresolved drift events Fields submitters are sending that the published schema doesn't declare. Resolve by publishing an updated schema.

ParameterTypeDescription
formId *string

forms_submissions_list

List submissions for a form

ParameterTypeDescription
formId *string
cursorstring
limitinteger
qstringFree-text search over submission data.
sincestringISO timestamp; only submissions received after this.
statusstringFilter by status: received, quarantined or spam.

submissions_list

Search submissions across the organization

ParameterTypeDescription
cursorstring
formstringFilter to one form id.
limitinteger
qstringFree-text search over submission data.
statusstringFilter by status: received, quarantined or spam.
streamstringFilter to submissions routed through this stream id.

submissions_get

Get a submission with its deliveries

ParameterTypeDescription
submissionId *string

submissions_update

Change status (re-routes if moving to received) Moving a quarantined submission to `received` re-runs routing and queues deliveries for it.

ParameterTypeDescription
status *string
submissionId *string

submissions_delete

Delete permanently (GDPR) Irreversible. Use for data-subject deletion requests; deliveries already sent are unaffected.

ParameterTypeDescription
submissionId *string

streams_list

List streams

ParameterTypeDescription
cursorstring
limitinteger

streams_create

Create a stream (optionally with its first schema version and sources) A stream (shown as 'Bag' in the dashboard) fans one canonical schema in from many forms.

ParameterTypeDescription
if_existsstring
namestring
schemaobject
slugstring
sourcesarray

streams_get

Get a stream with schema, sources, mapping status and routes

ParameterTypeDescription
streamId *string

streams_update

Update name/slug

ParameterTypeDescription
streamId *string
if_existsstring
namestring
schemaobject
slugstring
sourcesarray

streams_delete

Delete a stream

ParameterTypeDescription
streamId *string

streams_schema_get

Current stream schema

ParameterTypeDescription
streamId *string

streams_schema_publish

Publish a new stream schema version Schemas are immutable versions — this always creates version N+1. Re-validates every attached source's mapping against the new schema and returns the updated mapping statuses alongside it.

ParameterTypeDescription
json_schema *objectJSON Schema draft 2020-12 describing the submission data. `required` drives drift detection and mapping completeness.
streamId *string
changelogstringA short human note on what changed in this version, shown in the version history.
uiobjectPer-field rendering hints keyed by field name (label, placeholder, widget, options, order) — used to render embed snippets.

streams_sources_list

List sources and their mapping status

ParameterTypeDescription
streamId *string

streams_sources_add

Attach a form or selector with a mapping Fails 422 mapping_incomplete (with the missing fields listed) if the mapping does not cover every field the stream's current schema requires — a form can't join a stream it can't feed.

ParameterTypeDescription
streamId *string
form_idstringThe form feeding this stream (mutually exclusive with `selector` in principle, though only one source kind is currently supported).
mappingobjectKeyed by the stream schema's field names. Each entry is exactly one of `from` (copy a field from the form's data), `const` (a fixed value) or `expr` (a JSONata expression), plus an optional `default`.…
selectorstringReserved for non-form sources (not yet implemented).

streams_sources_update

Update the mapping

ParameterTypeDescription
sourceId *string
streamId *string
form_idstringThe form feeding this stream (mutually exclusive with `selector` in principle, though only one source kind is currently supported).
mappingobjectKeyed by the stream schema's field names. Each entry is exactly one of `from` (copy a field from the form's data), `const` (a fixed value) or `expr` (a JSONata expression), plus an optional `default`.…
selectorstringReserved for non-form sources (not yet implemented).

streams_sources_remove

Detach

ParameterTypeDescription
sourceId *string
streamId *string

streams_preview

Run a sample submission through a source's mapping Dry-runs a form's attached mapping against sample data without storing anything — useful before publishing a schema change.

ParameterTypeDescription
data *objectSample submission data to map through.
form_id *stringThe form whose attached mapping to run.
streamId *string

destinations_list

List destinations (secrets redacted)

ParameterTypeDescription
cursorstring
limitinteger

destinations_create

Create a destination type is one of email, telegram, webhook, slack, discord; config shape depends on type. Call destinations_test after creating to verify it works.

ParameterTypeDescription
body *

destinations_get

Get a destination (secrets redacted)

ParameterTypeDescription
destinationId *string

destinations_update

Update config

ParameterTypeDescription
destinationId *string
configobjectMerged shallowly into the existing config (type-specific: to/cc for email, chat_id/bot_token for telegram, url/secret for webhook).
namestringA display label for this destination.

destinations_delete

Delete (fails if routes reference it) Fails with 409 while a route still points at this destination — delete or repoint those routes first.

ParameterTypeDescription
destinationId *string

destinations_test

Send a sample payload now and return the provider response Verifies a destination is actually reachable and configured correctly — do this right after creating one, before wiring routes to it.

ParameterTypeDescription
destinationId *string
sampleobjectOverride the default sample payload sent for the test.

routes_list

List routes

ParameterTypeDescription
cursorstring
destinationstringFilter to routes pointing at this destination id.
formstringFilter to routes whose source is this form id.
limitinteger
streamstringFilter to routes whose source is this stream id.

routes_create

Create a route (source is exactly one of form_id / stream_id) A route ties one source (a form or a stream) to one destination, with a mode (instant or digest) and optional filter/transform/quality rules.

ParameterTypeDescription
destination_id *string
enabledboolean
filterstring
form_idstring
mode
qualityobject
stream_idstring
transformstring
windowobject

routes_get

Get a route

ParameterTypeDescription
routeId *string

routes_update

Update rules / enable / disable

ParameterTypeDescription
routeId *string
enabledbooleanDisable a route without deleting it.
filterstringA JSONata boolean expression; only matching submissions are delivered.
modeobjectinstant delivers as submissions arrive; digest batches into one payload per period.
qualityobjectDefaults to excluding spam and quarantined submissions from delivery.
transformstringA JSONata expression applied to the payload before delivery.
windowobjectOnly deliver submissions received in this ISO datetime range.

routes_delete

Delete a route

ParameterTypeDescription
routeId *string

deliveries_list

List deliveries (the outbox) A submission is a row before it is anything else; delivery is this outbox drained by a worker. Poll here to confirm a submission actually arrived at its destination.

ParameterTypeDescription
cursorstring
destinationstringFilter to one destination id.
limitinteger
routestringFilter to one route id.
statusstringFilter by status: pending, sending, sent, failed, dead or skipped.
submissionstringFilter to one submission id.

deliveries_get

Get a delivery with payload snapshot and last response

ParameterTypeDescription
deliveryId *string

deliveries_retry

Re-snapshot the payload against current mapping/transform and queue again Use after fixing a destination's config or a stream's mapping so a `failed` or `dead` delivery gets another chance.

ParameterTypeDescription
deliveryId *string

events_list

Organization event log Every notable thing that happened in this org — form.created, form.schema.changed, stream.schema.changed, submission.received, and more. System webhooks (below) are just subscriptions to this same log.

ParameterTypeDescription
cursorstring
limitinteger
sincestringISO timestamp; only events after this.
typestringFilter to one event type, e.g. 'submission.received'.

webhooks_list

List system webhooks System webhooks notify an external system when org events happen (not to be confused with a webhook destination, which delivers submissions).

webhooks_create

Subscribe a URL to event types Every delivery is signed with the returned (or supplied) secret so the receiver can verify authenticity.

ParameterTypeDescription
events *array
url *string
enabledboolean
secretstring

webhooks_update

Update a system webhook

ParameterTypeDescription
webhookId *string
enabledboolean
eventsarray
secretstring
urlstring

webhooks_delete

Delete a system webhook

ParameterTypeDescription
webhookId *string

webhooks_deliveries

Delivery history for a system webhook

ParameterTypeDescription
webhookId *string
cursorstring
limitinteger

health_get

Liveness and readiness Public, unauthenticated. Reports database connectivity, worker heartbeat and the oldest pending delivery age.

postbag_quickstart

The one call to make first when setting up a new form: creates (idempotently, by name within project) the project if missing, the form, a destination for whichever of notify_email/telegram/webhook you pass, and a direct route between them — a working, routed form in a single call. Everything it does is also available as individual tools (forms_create, destinations_create, routes_create) if you need more control; this is a convenience, not a special path. The response's "next" array lists ready-to-use follow-up calls (e.g. adding a second destination), and "verify" gives you a test submissio…

ParameterTypeDescription
name *string
notify_emailstring
originstring
projectstring
redirect_urlstring
tagsarray
telegramobject
webhookobject

postbag_explain

Returns Postbag's agent onboarding guide (the same content as GET /llms.txt): what Postbag is, the vocabulary (Form, Submission, Stream, Destination, Route, Delivery), and the handful of calls that matter. Call this first, before anything else, if you are not already familiar with Postbag — then call postbag_quickstart to create a working form.