Server definition
- Hash
- sha256:50d70bc19c94cad5fa487295a7be9c87b635b17f0337eacddd3b2f5393e24fce
- What it is
- What a remote MCP server returned when asked what it offers: 8 tools
The blob, as servednamed by its sha256
{
"instructions": "PaperAgent prints and mails real paper letters through the United States Postal Service from New York City. It is not email.\n\nReach for these tools only when the user wants something delivered on paper. If the user asks to email, fax or text something, none of these tools apply — say that this connector only mails physical letters, and ask whether they would like one sent instead of assuming. If the user asks you to write, draft or print something they will handle themselves, write it in your reply and stop there; offering to mail it afterwards is welcome, drafting it here first is not. When the request does not say how it should reach the recipient, ask before creating a draft.\n\nWork in this order: validate_address, then create_draft, then preview_draft, and show the user the letter and the exact total before calling send_letter. send_letter requires that total echoed back as confirm_total_cents plus an idempotency_key you generate once. It charges nothing and prints nothing: it answers with a payment link to give the user, and the letter is printed and mailed on its own once that payment completes. Do not call send_letter a second time for the same letter. Once we print the letter, the piece is irreversible. US domestic addresses only.\n\nget_pricing and validate_address work without signing in. Every other tool needs authorization and answers 401 until the user connects.",
"tools": [
{
"description": "Create a draft of a physical letter to be printed on paper and mailed through USPS, and return its draft_id, page count and total price. A letter is at most 6 printed pages, at the same price whatever its length: up to 3 pages print one-sided, 4 to 6 print on both sides. Write the body to fit, or split a longer document into two letters, because a body that renders to 7 or more pages is refused rather than trimmed. This is NOT email, fax or text message — nothing reaches the recipient electronically, and the only way this letter arrives is on paper in an envelope. The body is plain text or Markdown. The draft freezes the content and the price for 24 hours and costs nothing; no paper is printed and no postage is bought until send_letter is called. US domestic addresses only. Call preview_draft next so the user can see the letter and the total.",
"inputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"body_file": {
"description": "A file the user attached, as the host delivers it. Not accepted yet — create_draft refuses an attachment and asks for the letter as body_markdown text.",
"properties": {
"download_url": {
"description": "A short-lived URL the file can be fetched from.",
"type": "string"
},
"file_id": {
"description": "The host's identifier for the uploaded file.",
"type": "string"
},
"file_name": {
"description": "The name the file was uploaded under.",
"type": "string"
},
"mime_type": {
"description": "The file's media type, e.g. application/pdf.",
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"type": "object"
},
"body_markdown": {
"description": "The text of the letter, as plain text or Markdown. It must render to 6 printed pages or fewer — roughly 2,400 words of body text.",
"minLength": 1,
"type": "string"
},
"colour": {
"description": "Omit this. The current price card prints every letter black & white, so passing true is refused rather than billed — call get_pricing for what it does sell. The field remains because letters priced on an older card carry it.",
"type": "boolean"
},
"from_address_id": {
"description": "Omit this. The account's own verified return address is used by default; only pass an id the account holder gave you.",
"type": "string"
},
"tier": {
"description": "Defaults to standard. Call get_pricing first and pass a tier it lists: standard is a plain First-Class letter. certified, certified_err, proof_of_mailing and registered are other products the current price card may not sell, and a tier it does not sell is refused, not substituted — so do not describe one to the user until get_pricing has listed it.",
"enum": [
"standard",
"proof_of_mailing",
"certified",
"certified_err",
"registered"
],
"type": "string"
},
"to": {
"description": "Who the letter is mailed to.",
"properties": {
"city": {
"minLength": 1,
"type": "string"
},
"line1": {
"description": "Street number and street name, or PO box.",
"minLength": 1,
"type": "string"
},
"line2": {
"description": "Apartment, suite, floor or unit.",
"type": "string"
},
"name": {
"description": "The person or company the letter is addressed to.",
"minLength": 1,
"type": "string"
},
"postal_code": {
"description": "Five-digit ZIP or ZIP+4, such as 10001 or 10001-2345.",
"type": "string"
},
"state": {
"description": "Two-letter US state or territory code, such as NY.",
"maxLength": 2,
"minLength": 2,
"type": "string"
}
},
"required": [
"name",
"line1",
"city",
"state",
"postal_code"
],
"type": "object"
}
},
"required": [
"to",
"body_markdown"
],
"type": "object"
},
"name": "create_draft",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"draft_id": {
"description": "Pass this to preview_draft, update_draft and send_letter.",
"type": "string"
},
"expires_at": {
"description": "ISO 8601 instant the draft is deleted. Nothing is charged if it expires.",
"type": "string"
},
"included_pages": {
"description": "Printed pages the headline price covers. This draft is priced at that total up to this many pages.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"note": {
"description": "The next call to make. Read it before answering the user.",
"type": "string"
},
"page_count": {
"description": "Printed pages, as counted by the renderer. Never more than 6 — a longer body is refused.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"quote": {
"additionalProperties": false,
"description": "A priced letter. State total.display to the user before sending, and pass total.amount_cents as confirm_total_cents.",
"properties": {
"expires_at": {
"description": "ISO 8601 instant after which this total is re-computed from the live price card. Call preview_draft for a fresh quote before sending if it has passed.",
"type": "string"
},
"quote_id": {
"description": "Identifier for this quote, for support and receipts.",
"type": "string"
},
"subtotal": {
"additionalProperties": false,
"description": "What the letter costs, before sales tax.",
"properties": {
"amount_cents": {
"description": "The amount in whole US cents.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"currency": {
"const": "USD",
"type": "string"
},
"display": {
"description": "The amount formatted for a person, with a currency symbol.",
"type": "string"
}
},
"required": [
"amount_cents",
"currency",
"display"
],
"type": "object"
},
"tax": {
"additionalProperties": false,
"properties": {
"collected": {
"additionalProperties": false,
"description": "New York sales tax on this letter. We mail from New York, so a few cents apply wherever the letter goes, and more when it is going to New York.",
"properties": {
"amount_cents": {
"description": "The amount in whole US cents.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"currency": {
"const": "USD",
"type": "string"
},
"display": {
"description": "The amount formatted for a person, with a currency symbol.",
"type": "string"
}
},
"required": [
"amount_cents",
"currency",
"display"
],
"type": "object"
},
"destination_state": {
"type": "string"
}
},
"required": [
"collected",
"destination_state"
],
"type": "object"
},
"total": {
"additionalProperties": false,
"description": "Subtotal plus sales tax. This is the number send_letter requires in confirm_total_cents.",
"properties": {
"amount_cents": {
"description": "The amount in whole US cents.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"currency": {
"const": "USD",
"type": "string"
},
"display": {
"description": "The amount formatted for a person, with a currency symbol.",
"type": "string"
}
},
"required": [
"amount_cents",
"currency",
"display"
],
"type": "object"
},
"version": {
"description": "The published price card this total came from.",
"type": "string"
}
},
"required": [
"quote_id",
"expires_at",
"version",
"subtotal",
"tax",
"total"
],
"type": "object"
},
"sheet_count": {
"description": "Sheets of paper this letter is printed on: one page per sheet, one side each, up to 3 pages; a letter of 4 to 6 pages is printed on both sides, so it is never more than 3 sheets.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"tier": {
"description": "The product this draft is priced as, as passed to create_draft or update_draft.",
"enum": [
"standard",
"proof_of_mailing",
"certified",
"certified_err",
"registered"
],
"type": "string"
},
"tier_title": {
"description": "What the price card in force calls that product, such as Standard. Use this name when you tell the user what they are buying.",
"type": "string"
}
},
"required": [
"draft_id",
"page_count",
"sheet_count",
"tier",
"tier_title",
"included_pages",
"quote",
"expires_at",
"note"
],
"type": "object"
}
},
{
"description": "Return the current state of one letter: where it is, the date it goes to USPS, and the estimated delivery date. USPS does not scan plain First-Class letters at delivery, so a Standard letter ends at an expected delivery date and never reports delivery — do not tell the user a letter arrived unless the status itself says so. This creates nothing and mails nothing.",
"inputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"letter_id": {
"type": "string"
}
},
"required": [
"letter_id"
],
"type": "object"
},
"name": "get_letter_status",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"cancelled_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string"
},
"delivered_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Certified tiers only, and absent entirely for the tiers USPS does not scan."
},
"delivery_confirmation": {
"description": "False for every tier USPS does not scan at delivery. Never claim otherwise.",
"type": "boolean"
},
"description": {
"description": "One sentence for the user about where this letter is.",
"type": "string"
},
"disclosure": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Say this to the user whenever an expected delivery date is shown."
},
"expected_delivery_estimate": {
"anyOf": [
{
"additionalProperties": false,
"description": "The window (YYYY-MM-DD, New York time) USPS is expected to deliver in. USPS does not scan plain letters at delivery, so this is an estimate and never a confirmation.",
"properties": {
"earliest": {
"type": "string"
},
"latest": {
"type": "string"
}
},
"required": [
"earliest",
"latest"
],
"type": "object"
},
{
"type": "null"
}
]
},
"letter_id": {
"type": "string"
},
"livemode": {
"description": "False for sandbox letters, which are never mailed.",
"type": "boolean"
},
"mail_date": {
"description": "The calendar date (YYYY-MM-DD, New York time) this piece goes to USPS.",
"type": "string"
},
"payment": {
"additionalProperties": false,
"properties": {
"checkout_url": {
"description": "Present only while the letter is waiting for payment. Give it to the user.",
"type": "string"
},
"order_id": {
"type": "string"
},
"order_status": {
"enum": [
"pending",
"awaiting_payment",
"paid",
"failed",
"refunded",
"disputed",
"abandoned"
],
"type": "string"
},
"paid_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"additionalProperties": false,
"description": "An amount of money. Always read amount_cents; display is for showing the user.",
"properties": {
"amount_cents": {
"description": "The amount in whole US cents.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"currency": {
"const": "USD",
"type": "string"
},
"display": {
"description": "The amount formatted for a person, with a currency symbol.",
"type": "string"
}
},
"required": [
"amount_cents",
"currency",
"display"
],
"type": "object"
}
},
"required": [
"order_id",
"order_status",
"paid_at",
"total"
],
"type": "object"
},
"scans": {
"items": {
"additionalProperties": false,
"properties": {
"description": {
"type": "string"
},
"phase": {
"description": "The USPS processing phase this scan came from, 0 through 4.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"scanned_at": {
"type": "string"
}
},
"required": [
"phase",
"scanned_at",
"description"
],
"type": "object"
},
"type": "array"
},
"status": {
"description": "Where the letter is. expected_delivery is the last state a standard or proof-of-mailing letter reaches; only certified tiers ever reach delivered.",
"enum": [
"pending_payment",
"pending_moderation",
"held_for_review",
"queued",
"printed",
"postage_applied",
"accepted_by_usps",
"in_transit",
"arrived_at_destination_facility",
"expected_delivery",
"delivered",
"blocked",
"cancelled",
"payment_abandoned",
"returned"
],
"type": "string"
},
"tier": {
"enum": [
"standard",
"proof_of_mailing",
"certified",
"certified_err",
"registered"
],
"type": "string"
},
"tracking_number": {
"description": "USPS Certified Mail tracking number, present once the operator saves it.",
"type": "string"
},
"tracking_url": {
"description": "Direct USPS tracking link. Share it with the user when available.",
"type": "string"
}
},
"required": [
"letter_id",
"livemode",
"tier",
"status",
"description",
"mail_date",
"expected_delivery_estimate",
"delivery_confirmation",
"disclosure",
"scans",
"created_at",
"cancelled_at",
"payment"
],
"type": "object"
}
},
{
"description": "Return the published price list for mailing physical letters through USPS: the products on sale, what each one costs, how many pages it covers, and when sales tax applies. Amounts are in US cents. Every letter is one of these prices — there is no volume discount, no per-page charge and no colour printing — so quote the tier total and say New York sales tax is added, whatever the destination. Call this before telling a user what a letter will cost. This creates nothing and mails nothing.",
"inputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {},
"type": "object"
},
"name": "get_pricing",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"add_ons": {
"items": {
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"description": {
"type": "string"
},
"unit_amount": {
"additionalProperties": false,
"description": "An amount of money. Always read amount_cents; display is for showing the user.",
"properties": {
"amount_cents": {
"description": "The amount in whole US cents.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"currency": {
"const": "USD",
"type": "string"
},
"display": {
"description": "The amount formatted for a person, with a currency symbol.",
"type": "string"
}
},
"required": [
"amount_cents",
"currency",
"display"
],
"type": "object"
}
},
"required": [
"code",
"description",
"unit_amount"
],
"type": "object"
},
"type": "array"
},
"country": {
"type": "string"
},
"currency": {
"type": "string"
},
"effective_from": {
"type": "string"
},
"page_rules": {
"additionalProperties": false,
"properties": {
"additional_ounce": {
"additionalProperties": false,
"description": "An amount of money. Always read amount_cents; display is for showing the user.",
"properties": {
"amount_cents": {
"description": "The amount in whole US cents.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"currency": {
"const": "USD",
"type": "string"
},
"display": {
"description": "The amount formatted for a person, with a currency symbol.",
"type": "string"
}
},
"required": [
"amount_cents",
"currency",
"display"
],
"type": "object"
},
"included_pages": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"max_pages": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"pages_per_sheet": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
}
},
"required": [
"included_pages",
"max_pages",
"pages_per_sheet"
],
"type": "object"
},
"tax": {
"additionalProperties": false,
"properties": {
"note": {
"type": "string"
},
"origin_state": {
"type": "string"
}
},
"required": [
"origin_state",
"note"
],
"type": "object"
},
"tiers": {
"items": {
"additionalProperties": false,
"properties": {
"delivery_confirmation": {
"description": "False for every tier USPS does not scan at delivery. Never claim otherwise.",
"type": "boolean"
},
"description": {
"type": "string"
},
"tier": {
"enum": [
"standard",
"proof_of_mailing",
"certified",
"certified_err",
"registered"
],
"type": "string"
},
"title": {
"type": "string"
},
"total": {
"additionalProperties": false,
"description": "An amount of money. Always read amount_cents; display is for showing the user.",
"properties": {
"amount_cents": {
"description": "The amount in whole US cents.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"currency": {
"const": "USD",
"type": "string"
},
"display": {
"description": "The amount formatted for a person, with a currency symbol.",
"type": "string"
}
},
"required": [
"amount_cents",
"currency",
"display"
],
"type": "object"
}
},
"required": [
"tier",
"title",
"description",
"delivery_confirmation",
"total"
],
"type": "object"
},
"type": "array"
},
"version": {
"type": "string"
},
"volume_pricing": {
"additionalProperties": false,
"properties": {
"applies_to": {
"items": {
"enum": [
"standard",
"proof_of_mailing",
"certified",
"certified_err",
"registered"
],
"type": "string"
},
"type": "array"
},
"tiers": {
"items": {
"additionalProperties": false,
"properties": {
"max_letters": {
"anyOf": [
{
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
{
"type": "null"
}
]
},
"min_letters": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"total": {
"additionalProperties": false,
"description": "An amount of money. Always read amount_cents; display is for showing the user.",
"properties": {
"amount_cents": {
"description": "The amount in whole US cents.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"currency": {
"const": "USD",
"type": "string"
},
"display": {
"description": "The amount formatted for a person, with a currency symbol.",
"type": "string"
}
},
"required": [
"amount_cents",
"currency",
"display"
],
"type": "object"
}
},
"required": [
"min_letters",
"max_letters",
"total"
],
"type": "object"
},
"type": "array"
},
"window": {
"type": "string"
}
},
"required": [
"applies_to",
"window",
"tiers"
],
"type": "object"
}
},
"required": [
"version",
"effective_from",
"currency",
"country",
"tiers",
"add_ons",
"page_rules",
"tax"
],
"type": "object"
}
},
{
"description": "Return this account's letters, newest first, with the status, mail date and total for each. Use this to answer questions about what has already been sent. This creates nothing, changes nothing and mails nothing.",
"inputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"limit": {
"description": "Defaults to 20.",
"maximum": 100,
"minimum": 1,
"type": "integer"
},
"starting_after": {
"description": "The next_cursor from the previous call, to read the following page.",
"type": "string"
}
},
"type": "object"
},
"name": "list_letters",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"has_more": {
"type": "boolean"
},
"letters": {
"items": {
"additionalProperties": false,
"properties": {
"created_at": {
"type": "string"
},
"destination_state": {
"type": "string"
},
"letter_id": {
"type": "string"
},
"mail_date": {
"type": "string"
},
"status": {
"description": "Where the letter is. expected_delivery is the last state a standard or proof-of-mailing letter reaches; only certified tiers ever reach delivered.",
"enum": [
"pending_payment",
"pending_moderation",
"held_for_review",
"queued",
"printed",
"postage_applied",
"accepted_by_usps",
"in_transit",
"arrived_at_destination_facility",
"expected_delivery",
"delivered",
"blocked",
"cancelled",
"payment_abandoned",
"returned"
],
"type": "string"
},
"tier": {
"enum": [
"standard",
"proof_of_mailing",
"certified",
"certified_err",
"registered"
],
"type": "string"
},
"total": {
"additionalProperties": false,
"description": "An amount of money. Always read amount_cents; display is for showing the user.",
"properties": {
"amount_cents": {
"description": "The amount in whole US cents.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"currency": {
"const": "USD",
"type": "string"
},
"display": {
"description": "The amount formatted for a person, with a currency symbol.",
"type": "string"
}
},
"required": [
"amount_cents",
"currency",
"display"
],
"type": "object"
}
},
"required": [
"letter_id",
"status",
"tier",
"created_at",
"mail_date",
"total",
"destination_state"
],
"type": "object"
},
"type": "array"
},
"next_cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Pass this back as starting_after for the next page."
}
},
"required": [
"letters",
"has_more",
"next_cursor"
],
"type": "object"
}
},
{
"description": "Return a link to the rendered PDF of a draft together with its page count and current total price. Refreshes the stored price quote when pricing has changed. Use this to show the user exactly what will be printed and exactly what it costs before calling send_letter. The total in the response is the number send_letter requires as confirm_total_cents. This does not create an order or mail a letter.",
"inputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"draft_id": {
"type": "string"
}
},
"required": [
"draft_id"
],
"type": "object"
},
"name": "preview_draft",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"draft_id": {
"type": "string"
},
"expires_at": {
"type": "string"
},
"included_pages": {
"description": "Printed pages the headline price covers. This draft is priced at that total up to this many pages.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"page_count": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"preview_url": {
"description": "A time-limited link to the exact PDF that will be printed. Give it to the user; it dies with the draft.",
"type": "string"
},
"quote": {
"additionalProperties": false,
"description": "A priced letter. State total.display to the user before sending, and pass total.amount_cents as confirm_total_cents.",
"properties": {
"expires_at": {
"description": "ISO 8601 instant after which this total is re-computed from the live price card. Call preview_draft for a fresh quote before sending if it has passed.",
"type": "string"
},
"quote_id": {
"description": "Identifier for this quote, for support and receipts.",
"type": "string"
},
"subtotal": {
"additionalProperties": false,
"description": "What the letter costs, before sales tax.",
"properties": {
"amount_cents": {
"description": "The amount in whole US cents.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"currency": {
"const": "USD",
"type": "string"
},
"display": {
"description": "The amount formatted for a person, with a currency symbol.",
"type": "string"
}
},
"required": [
"amount_cents",
"currency",
"display"
],
"type": "object"
},
"tax": {
"additionalProperties": false,
"properties": {
"collected": {
"additionalProperties": false,
"description": "New York sales tax on this letter. We mail from New York, so a few cents apply wherever the letter goes, and more when it is going to New York.",
"properties": {
"amount_cents": {
"description": "The amount in whole US cents.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"currency": {
"const": "USD",
"type": "string"
},
"display": {
"description": "The amount formatted for a person, with a currency symbol.",
"type": "string"
}
},
"required": [
"amount_cents",
"currency",
"display"
],
"type": "object"
},
"destination_state": {
"type": "string"
}
},
"required": [
"collected",
"destination_state"
],
"type": "object"
},
"total": {
"additionalProperties": false,
"description": "Subtotal plus sales tax. This is the number send_letter requires in confirm_total_cents.",
"properties": {
"amount_cents": {
"description": "The amount in whole US cents.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"currency": {
"const": "USD",
"type": "string"
},
"display": {
"description": "The amount formatted for a person, with a currency symbol.",
"type": "string"
}
},
"required": [
"amount_cents",
"currency",
"display"
],
"type": "object"
},
"version": {
"description": "The published price card this total came from.",
"type": "string"
}
},
"required": [
"quote_id",
"expires_at",
"version",
"subtotal",
"tax",
"total"
],
"type": "object"
},
"requirements": {
"description": "What the user is agreeing to: how USPS requires the envelope to be printed, and what this particular letter is. State these to the user before calling send_letter.",
"items": {
"type": "string"
},
"type": "array"
},
"tier": {
"description": "The product this draft is priced as, as passed to create_draft.",
"enum": [
"standard",
"proof_of_mailing",
"certified",
"certified_err",
"registered"
],
"type": "string"
},
"tier_title": {
"description": "What the price card in force calls that product, such as Standard. Use this name when you tell the user what they are buying.",
"type": "string"
}
},
"required": [
"draft_id",
"preview_url",
"page_count",
"tier",
"tier_title",
"included_pages",
"quote",
"expires_at",
"requirements"
],
"type": "object"
}
},
{
"description": "Create an order for a real, physical letter through the United States Postal Service. It returns a payment link; no paper is printed, postage is bought, or letter is mailed until payment completes. Use this whenever the user asks to mail, post, send by post, or physically send a letter, notice, or document to a street address. This is NOT email — use an email tool for email. US domestic addresses only. Requires a draft_id from create_draft and confirm_total_cents matching the current quote. The letter becomes irreversible once we print it.",
"inputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"confirm_total_cents": {
"description": "The exact total.amount_cents from the current quote, including sales tax. Say the total out loud to the user first; if it does not match the live quote this call fails and no letter is sent.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"draft_id": {
"description": "The draft_id returned by create_draft or preview_draft.",
"type": "string"
},
"idempotency_key": {
"description": "A key you generate once for this send. Retrying with the same draft_id and the same key returns the original letter instead of mailing a second one.",
"minLength": 1,
"type": "string"
}
},
"required": [
"draft_id",
"confirm_total_cents",
"idempotency_key"
],
"type": "object"
},
"name": "send_letter",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"checkout_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Give this link to the user. The letter is mailed once payment completes. Null when this call replayed a send whose payment has already completed — there is then nothing to pay and nothing to relay."
},
"letter_id": {
"type": "string"
},
"mail_date_estimate": {
"description": "The calendar date (YYYY-MM-DD, New York time) this piece goes to USPS if the payment lands before that day’s 14:30 cutoff.",
"type": "string"
},
"message": {
"description": "What to tell the user. Relay the link and the total.",
"type": "string"
},
"order_id": {
"type": "string"
},
"quote": {
"additionalProperties": false,
"description": "A priced letter. State total.display to the user before sending, and pass total.amount_cents as confirm_total_cents.",
"properties": {
"expires_at": {
"description": "ISO 8601 instant after which this total is re-computed from the live price card. Call preview_draft for a fresh quote before sending if it has passed.",
"type": "string"
},
"quote_id": {
"description": "Identifier for this quote, for support and receipts.",
"type": "string"
},
"subtotal": {
"additionalProperties": false,
"description": "What the letter costs, before sales tax.",
"properties": {
"amount_cents": {
"description": "The amount in whole US cents.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"currency": {
"const": "USD",
"type": "string"
},
"display": {
"description": "The amount formatted for a person, with a currency symbol.",
"type": "string"
}
},
"required": [
"amount_cents",
"currency",
"display"
],
"type": "object"
},
"tax": {
"additionalProperties": false,
"properties": {
"collected": {
"additionalProperties": false,
"description": "New York sales tax on this letter. We mail from New York, so a few cents apply wherever the letter goes, and more when it is going to New York.",
"properties": {
"amount_cents": {
"description": "The amount in whole US cents.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"currency": {
"const": "USD",
"type": "string"
},
"display": {
"description": "The amount formatted for a person, with a currency symbol.",
"type": "string"
}
},
"required": [
"amount_cents",
"currency",
"display"
],
"type": "object"
},
"destination_state": {
"type": "string"
}
},
"required": [
"collected",
"destination_state"
],
"type": "object"
},
"total": {
"additionalProperties": false,
"description": "Subtotal plus sales tax. This is the number send_letter requires in confirm_total_cents.",
"properties": {
"amount_cents": {
"description": "The amount in whole US cents.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"currency": {
"const": "USD",
"type": "string"
},
"display": {
"description": "The amount formatted for a person, with a currency symbol.",
"type": "string"
}
},
"required": [
"amount_cents",
"currency",
"display"
],
"type": "object"
},
"version": {
"description": "The published price card this total came from.",
"type": "string"
}
},
"required": [
"quote_id",
"expires_at",
"version",
"subtotal",
"tax",
"total"
],
"type": "object"
},
"status": {
"description": "The current letter status, including on an idempotent replay. Nothing is printed or mailed until payment completes.",
"enum": [
"pending_payment",
"pending_moderation",
"held_for_review",
"queued",
"printed",
"postage_applied",
"accepted_by_usps",
"in_transit",
"arrived_at_destination_facility",
"expected_delivery",
"delivered",
"blocked",
"cancelled",
"payment_abandoned",
"returned"
],
"type": "string"
}
},
"required": [
"letter_id",
"order_id",
"status",
"checkout_url",
"quote",
"mail_date_estimate",
"message"
],
"type": "object"
}
},
{
"description": "Change the recipient, body, tier or colour of a draft that has not been sent, and re-price it. Returns a new page count and a new quote, so the previous total is void — state the new total to the user before sending. The 6-printed-page maximum applies to the new body as well: a replacement that renders to 7 or more pages is refused and the draft is left as it was. This creates nothing and mails nothing.",
"inputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"body_markdown": {
"description": "Replaces the whole letter text. It must render to 6 printed pages or fewer — roughly 2,400 words of body text.",
"minLength": 1,
"type": "string"
},
"colour": {
"description": "Omit this. The current price card prints black & white only; true is refused.",
"type": "boolean"
},
"draft_id": {
"description": "The draft_id returned by create_draft.",
"type": "string"
},
"from_address_id": {
"type": "string"
},
"tier": {
"description": "Which product to buy. Call get_pricing first and pass a tier it lists: standard is a plain First-Class letter. certified, certified_err, proof_of_mailing and registered are other products the current price card may not sell, and a tier it does not sell is refused rather than substituted — so do not describe one to the user until get_pricing has listed it.",
"enum": [
"standard",
"proof_of_mailing",
"certified",
"certified_err",
"registered"
],
"type": "string"
},
"to": {
"description": "A complete US postal address. US domestic addresses only.",
"properties": {
"city": {
"minLength": 1,
"type": "string"
},
"line1": {
"description": "Street number and street name, or PO box.",
"minLength": 1,
"type": "string"
},
"line2": {
"description": "Apartment, suite, floor or unit.",
"type": "string"
},
"name": {
"description": "The person or company the letter is addressed to.",
"minLength": 1,
"type": "string"
},
"postal_code": {
"description": "Five-digit ZIP or ZIP+4, such as 10001 or 10001-2345.",
"type": "string"
},
"state": {
"description": "Two-letter US state or territory code, such as NY.",
"maxLength": 2,
"minLength": 2,
"type": "string"
}
},
"required": [
"name",
"line1",
"city",
"state",
"postal_code"
],
"type": "object"
}
},
"required": [
"draft_id"
],
"type": "object"
},
"name": "update_draft",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"draft_id": {
"description": "Pass this to preview_draft, update_draft and send_letter.",
"type": "string"
},
"expires_at": {
"description": "ISO 8601 instant the draft is deleted. Nothing is charged if it expires.",
"type": "string"
},
"included_pages": {
"description": "Printed pages the headline price covers. This draft is priced at that total up to this many pages.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"note": {
"description": "The next call to make. Read it before answering the user.",
"type": "string"
},
"page_count": {
"description": "Printed pages, as counted by the renderer. Never more than 6 — a longer body is refused.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"quote": {
"additionalProperties": false,
"description": "A priced letter. State total.display to the user before sending, and pass total.amount_cents as confirm_total_cents.",
"properties": {
"expires_at": {
"description": "ISO 8601 instant after which this total is re-computed from the live price card. Call preview_draft for a fresh quote before sending if it has passed.",
"type": "string"
},
"quote_id": {
"description": "Identifier for this quote, for support and receipts.",
"type": "string"
},
"subtotal": {
"additionalProperties": false,
"description": "What the letter costs, before sales tax.",
"properties": {
"amount_cents": {
"description": "The amount in whole US cents.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"currency": {
"const": "USD",
"type": "string"
},
"display": {
"description": "The amount formatted for a person, with a currency symbol.",
"type": "string"
}
},
"required": [
"amount_cents",
"currency",
"display"
],
"type": "object"
},
"tax": {
"additionalProperties": false,
"properties": {
"collected": {
"additionalProperties": false,
"description": "New York sales tax on this letter. We mail from New York, so a few cents apply wherever the letter goes, and more when it is going to New York.",
"properties": {
"amount_cents": {
"description": "The amount in whole US cents.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"currency": {
"const": "USD",
"type": "string"
},
"display": {
"description": "The amount formatted for a person, with a currency symbol.",
"type": "string"
}
},
"required": [
"amount_cents",
"currency",
"display"
],
"type": "object"
},
"destination_state": {
"type": "string"
}
},
"required": [
"collected",
"destination_state"
],
"type": "object"
},
"total": {
"additionalProperties": false,
"description": "Subtotal plus sales tax. This is the number send_letter requires in confirm_total_cents.",
"properties": {
"amount_cents": {
"description": "The amount in whole US cents.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"currency": {
"const": "USD",
"type": "string"
},
"display": {
"description": "The amount formatted for a person, with a currency symbol.",
"type": "string"
}
},
"required": [
"amount_cents",
"currency",
"display"
],
"type": "object"
},
"version": {
"description": "The published price card this total came from.",
"type": "string"
}
},
"required": [
"quote_id",
"expires_at",
"version",
"subtotal",
"tax",
"total"
],
"type": "object"
},
"sheet_count": {
"description": "Sheets of paper this letter is printed on: one page per sheet, one side each, up to 3 pages; a letter of 4 to 6 pages is printed on both sides, so it is never more than 3 sheets.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"tier": {
"description": "The product this draft is priced as, as passed to create_draft or update_draft.",
"enum": [
"standard",
"proof_of_mailing",
"certified",
"certified_err",
"registered"
],
"type": "string"
},
"tier_title": {
"description": "What the price card in force calls that product, such as Standard. Use this name when you tell the user what they are buying.",
"type": "string"
}
},
"required": [
"draft_id",
"page_count",
"sheet_count",
"tier",
"tier_title",
"included_pages",
"quote",
"expires_at",
"note"
],
"type": "object"
}
},
{
"description": "Check a US postal address and return it in the normalized form the envelope will be printed with, plus any warnings. The address is checked against the Google Address Validation service, which receives the address and nothing else. Use this before create_draft whenever the address came from a person rather than from an earlier tool result. Requires a complete street address: this does not look up, append or find an address from a name, and it does not handle addresses outside the United States. This creates nothing and mails nothing.",
"inputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"address": {
"description": "A complete US postal address. US domestic addresses only.",
"properties": {
"city": {
"minLength": 1,
"type": "string"
},
"line1": {
"description": "Street number and street name, or PO box.",
"minLength": 1,
"type": "string"
},
"line2": {
"description": "Apartment, suite, floor or unit.",
"type": "string"
},
"name": {
"description": "The person or company the letter is addressed to.",
"minLength": 1,
"type": "string"
},
"postal_code": {
"description": "Five-digit ZIP or ZIP+4, such as 10001 or 10001-2345.",
"type": "string"
},
"state": {
"description": "Two-letter US state or territory code, such as NY.",
"maxLength": 2,
"minLength": 2,
"type": "string"
}
},
"required": [
"name",
"line1",
"city",
"state",
"postal_code"
],
"type": "object"
}
},
"required": [
"address"
],
"type": "object"
},
"name": "validate_address",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"address": {
"anyOf": [
{
"additionalProperties": false,
"description": "The address as USPS holds it. Pass these fields back verbatim when you create a draft.",
"properties": {
"city": {
"type": "string"
},
"country": {
"const": "US",
"type": "string"
},
"line1": {
"type": "string"
},
"line2": {
"type": "string"
},
"postal_code": {
"description": "ZIP+4 where USPS supplied one, otherwise the five-digit ZIP.",
"type": "string"
},
"state": {
"type": "string"
}
},
"required": [
"line1",
"city",
"state",
"postal_code",
"country"
],
"type": "object"
},
{
"type": "null"
}
],
"description": "Null when USPS could not answer about the address at all."
},
"corrections": {
"description": "What USPS changed. Tell the user if it corrected anything material.",
"items": {
"type": "string"
},
"type": "array"
},
"deliverable": {
"type": "boolean"
},
"message": {
"description": "The sentence to act on. Read it before answering the user.",
"type": "string"
}
},
"required": [
"deliverable",
"address",
"corrections",
"message"
],
"type": "object"
}
}
]
}Verify it yourself
curl -s https://api.teppi.xyz/v1/evidence/sha256:50d70bc19c94cad5fa487295a7be9c87b635b17f0337eacddd3b2f5393e24fce | sha256sum