{
  "$schema": "https://modelcontextprotocol.io/schemas/server-card.json",
  "version": "0.14.3",
  "protocolVersion": "2025-06-18",
  "protocolVersions": [
    "2025-06-18",
    "2025-03-26",
    "2024-11-05"
  ],
  "name": "tohu-mcp",
  "title": "Tohu MCP Server",
  "description": "Model Context Protocol (MCP) Streamable HTTP server for Tohu (by Taki Labs) electronic signature envelopes, reusable templates, cryptographic PDF verification, reminders, and Standard Webhooks on Cloudflare Workers, D1, and R2.",
  "homepage": "https://tohu.takilabs.io",
  "documentationUrl": "https://tohu.takilabs.io/llms-full.txt",
  "openApiUrl": "https://tohu.takilabs.io/openapi.json",
  "serverInfo": {
    "name": "tohu-mcp",
    "title": "Tohu MCP Server",
    "version": "0.14.3",
    "description": "Model Context Protocol (MCP) Streamable HTTP server for Tohu (by Taki Labs) electronic signature envelopes, reusable templates, cryptographic PDF verification, reminders, and Standard Webhooks on Cloudflare Workers, D1, and R2."
  },
  "transport": {
    "type": "streamable-http",
    "endpoint": "https://tohu.takilabs.io/api/mcp",
    "url": "https://tohu.takilabs.io/api/mcp",
    "protocolVersions": [
      "2025-06-18",
      "2025-03-26",
      "2024-11-05"
    ]
  },
  "transports": [
    {
      "type": "streamable-http",
      "endpoint": "https://tohu.takilabs.io/api/mcp",
      "url": "https://tohu.takilabs.io/api/mcp",
      "protocolVersions": [
        "2025-06-18",
        "2025-03-26",
        "2024-11-05"
      ]
    }
  ],
  "remotes": [
    {
      "type": "streamable-http",
      "url": "https://tohu.takilabs.io/api/mcp",
      "headers": [
        {
          "name": "Authorization",
          "description": "API Key in format: Bearer sdk_<your_api_key>",
          "isRequired": false,
          "isSecret": true
        }
      ]
    }
  ],
  "authentication": {
    "type": "bearer",
    "scheme": "Bearer",
    "required": false,
    "keyPrefix": "sdk_",
    "headerNames": [
      "Authorization",
      "X-API-Key"
    ],
    "tokenManagementUrl": "https://tohu.takilabs.io/dashboard/settings",
    "openidConfigurationUrl": "https://tohu.takilabs.io/.well-known/openid-configuration",
    "oauthAuthorizationServerUrl": "https://tohu.takilabs.io/.well-known/oauth-authorization-server",
    "oauthProtectedResourceUrl": "https://tohu.takilabs.io/.well-known/oauth-protected-resource",
    "authorizationEndpoint": "https://tohu.takilabs.io/api/oauth/authorize",
    "tokenEndpoint": "https://tohu.takilabs.io/api/oauth/token",
    "registrationEndpoint": "https://tohu.takilabs.io/api/oauth/register",
    "jwksUri": "https://tohu.takilabs.io/.well-known/jwks.json",
    "unauthenticatedDiscovery": true,
    "publicTools": [
      "get_health"
    ]
  },
  "capabilities": {
    "tools": {
      "listChanged": false
    },
    "resources": {
      "subscribe": false,
      "listChanged": false
    },
    "prompts": {
      "listChanged": false
    },
    "logging": {},
    "completions": {}
  },
  "tools": [
    {
      "name": "get_health",
      "title": "Check Service Health & Version",
      "description": "Returns the live operational health, Taki Labs product family, build version, Git commit SHA, and timestamp of Tohu.",
      "inputSchema": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      }
    },
    {
      "name": "verify_document",
      "title": "Verify Signed PDF or Certificate SHA-256",
      "description": "Checks whether a 64-character hexadecimal SHA-256 hash matches an authentic signed PDF document or certificate of completion issued by this Tohu install.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "sha256": {
            "type": "string",
            "description": "Lowercase 64-character hexadecimal SHA-256 digest of the signed PDF or certificate PDF."
          }
        },
        "required": [
          "sha256"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "list_envelopes",
      "title": "List Signature Envelopes",
      "description": "Lists signature envelopes in the authenticated workspace, newest first, optionally filtered by status (draft, sent, completed, declined, voided).",
      "inputSchema": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "sent",
              "completed",
              "declined",
              "voided"
            ],
            "description": "Optional envelope status filter."
          },
          "limit": {
            "type": "number",
            "description": "Maximum number of envelopes to return (1-100, default 25)."
          },
          "cursor": {
            "type": "string",
            "description": "Pagination cursor from a previous list_envelopes call."
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "get_envelope",
      "title": "Get Envelope & Audit Events",
      "description": "Retrieves an envelope by ID, including signers, signing steps, copy recipients, download paths, and optional audit trail events.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "envelope_id": {
            "type": "string",
            "description": "The envelope ID."
          },
          "include_events": {
            "type": "boolean",
            "description": "Set true to include the full cryptographic audit trail events for the envelope."
          }
        },
        "required": [
          "envelope_id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "create_envelope",
      "title": "Create Signature Envelope",
      "description": "Creates a new signature envelope from a base64-encoded PDF or an uploadId from POST /api/v1/uploads, places fields for each signer ref, and optionally sends it immediately.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Title of the signature envelope."
          },
          "pdf_base64": {
            "type": "string",
            "description": "Base64-encoded PDF bytes for the source document (provide either pdf_base64 or upload_id)."
          },
          "upload_id": {
            "type": "string",
            "description": "Upload ID from POST /api/v1/uploads if the PDF was pre-uploaded."
          },
          "filename": {
            "type": "string",
            "description": "PDF file name (defaults to 'document.pdf')."
          },
          "signers": {
            "type": "array",
            "description": "Ordered list of signers with unique ref identifiers.",
            "items": {
              "type": "object",
              "properties": {
                "ref": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "email": {
                  "type": "string"
                },
                "step": {
                  "type": "number"
                },
                "accessCode": {
                  "type": "string"
                },
                "requireEmailCode": {
                  "type": "boolean"
                },
                "signatureMeaning": {
                  "type": "string",
                  "enum": [
                    "approval",
                    "review",
                    "responsibility",
                    "authorship"
                  ]
                }
              },
              "required": [
                "ref",
                "name",
                "email"
              ]
            }
          },
          "fields": {
            "type": "array",
            "description": "Fields placed on the PDF (fractions 0..1 from top-left corner). Optional when autoPlaceTextTags is true.",
            "items": {
              "type": "object",
              "properties": {
                "signer": {
                  "type": "string"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "signature",
                    "initials",
                    "date",
                    "name",
                    "text",
                    "checkbox",
                    "number",
                    "dropdown",
                    "radio",
                    "attachment"
                  ]
                },
                "page": {
                  "type": "number"
                },
                "x": {
                  "type": "number"
                },
                "y": {
                  "type": "number"
                },
                "width": {
                  "type": "number"
                },
                "height": {
                  "type": "number"
                },
                "required": {
                  "type": "boolean"
                },
                "label": {
                  "type": "string"
                },
                "groupId": {
                  "type": "string"
                },
                "options": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "validationRule": {
                  "type": "string",
                  "enum": [
                    "none",
                    "email",
                    "phone",
                    "url",
                    "date_iso",
                    "postal_code"
                  ]
                },
                "readOnly": {
                  "type": "boolean"
                },
                "prefillValue": {
                  "type": "string"
                },
                "formula": {
                  "type": "string"
                },
                "condition": {
                  "type": "object",
                  "properties": {
                    "fieldId": {
                      "type": "string"
                    },
                    "operator": {
                      "type": "string",
                      "enum": [
                        "equals",
                        "not_equals",
                        "checked",
                        "not_checked",
                        "not_empty"
                      ]
                    },
                    "value": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "fieldId",
                    "operator"
                  ]
                }
              },
              "required": [
                "signer",
                "type",
                "page",
                "x",
                "y",
                "width",
                "height"
              ]
            }
          },
          "autoPlaceTextTags": {
            "type": "boolean",
            "description": "Set true to automatically scan the PDF for bracketed {{...}} text tags (e.g. {{sig:1}}, {{text:1:Company:req:email}}) and place fields."
          },
          "redirectUrl": {
            "type": "string",
            "description": "Optional post-signing redirect URL (https://...) where signers are sent after completing their turn."
          },
          "copyRecipients": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "email": {
                  "type": "string"
                }
              },
              "required": [
                "name",
                "email"
              ]
            }
          },
          "metadata": {
            "type": "object",
            "description": "Optional JSON metadata (up to 2 KB) attached to the envelope."
          },
          "send": {
            "type": "object",
            "description": "Optional send options to send the envelope immediately.",
            "properties": {
              "permittedUseConfirmed": {
                "type": "boolean"
              },
              "delivery": {
                "type": "string",
                "enum": [
                  "email",
                  "embedded"
                ]
              },
              "expiresInDays": {
                "type": "number"
              },
              "redirectUrl": {
                "type": "string"
              },
              "reminderIntervalDays": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "signatureLevel": {
                "type": "string",
                "enum": [
                  "simple",
                  "advanced",
                  "qualified"
                ]
              }
            },
            "required": [
              "permittedUseConfirmed"
            ]
          }
        },
        "required": [
          "title",
          "signers"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "send_envelope",
      "title": "Send Draft Envelope",
      "description": "Sends a draft envelope to its signers in signing order.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "envelope_id": {
            "type": "string",
            "description": "The draft envelope ID to send."
          },
          "permittedUseConfirmed": {
            "type": "boolean",
            "description": "Must be true to confirm the document is an eligible business agreement."
          },
          "delivery": {
            "type": "string",
            "enum": [
              "email",
              "embedded"
            ],
            "description": "Delivery mode ('email' or 'embedded')."
          },
          "expiresInDays": {
            "type": "number",
            "description": "Optional expiration deadline in days (1-365)."
          },
          "redirectUrl": {
            "type": "string",
            "description": "Optional post-signing redirect URL (https://...) where signers are sent after completing their turn."
          },
          "reminderIntervalDays": {
            "type": [
              "number",
              "null"
            ],
            "description": "Optional automatic reminder interval in days (1-30)."
          },
          "signatureLevel": {
            "type": "string",
            "enum": [
              "simple",
              "advanced",
              "qualified"
            ],
            "description": "Electronic signature level."
          }
        },
        "required": [
          "envelope_id",
          "permittedUseConfirmed"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "void_envelope",
      "title": "Void Sent Envelope",
      "description": "Voids an in-flight sent envelope so no further signatures can be collected and notifies signers.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "envelope_id": {
            "type": "string",
            "description": "The sent envelope ID to void."
          },
          "reason": {
            "type": "string",
            "description": "Optional reason for voiding (required on Part 11 installs, max 1000 chars)."
          }
        },
        "required": [
          "envelope_id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "remind_envelope",
      "title": "Send Signer Reminder",
      "description": "Emails a reminder to each signer whose turn it currently is on a sent envelope.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "envelope_id": {
            "type": "string",
            "description": "The sent envelope ID."
          }
        },
        "required": [
          "envelope_id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "list_templates",
      "title": "List Saved Signature Templates",
      "description": "Lists saved document templates in the authenticated workspace along with their ordered signer role names.",
      "inputSchema": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      }
    },
    {
      "name": "use_template",
      "title": "Create Envelope From Template",
      "description": "Instantiates a new signature envelope from a saved template ID by mapping each template role to a signer, and optionally sends it immediately.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "template_id": {
            "type": "string",
            "description": "The saved template ID."
          },
          "title": {
            "type": "string",
            "description": "Title for the new envelope."
          },
          "signers": {
            "type": "array",
            "description": "Signers in the exact role order defined by the template.",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "email": {
                  "type": "string"
                },
                "signatureMeaning": {
                  "type": "string",
                  "enum": [
                    "approval",
                    "review",
                    "responsibility",
                    "authorship"
                  ]
                }
              },
              "required": [
                "name",
                "email"
              ]
            }
          },
          "metadata": {
            "type": "object",
            "description": "Optional JSON metadata (up to 2 KB)."
          },
          "prefill": {
            "type": "object",
            "description": "Optional key-value map of pre-filled field values keyed by field label or field ID.",
            "additionalProperties": {
              "type": "string"
            }
          },
          "redirectUrl": {
            "type": "string",
            "description": "Optional post-signing redirect URL (https://...) overriding the template default."
          },
          "send": {
            "type": "object",
            "description": "Optional send options to send immediately.",
            "properties": {
              "permittedUseConfirmed": {
                "type": "boolean"
              },
              "delivery": {
                "type": "string",
                "enum": [
                  "email",
                  "embedded"
                ]
              },
              "expiresInDays": {
                "type": "number"
              },
              "redirectUrl": {
                "type": "string"
              },
              "reminderIntervalDays": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "signatureLevel": {
                "type": "string",
                "enum": [
                  "simple",
                  "advanced",
                  "qualified"
                ]
              }
            },
            "required": [
              "permittedUseConfirmed"
            ]
          }
        },
        "required": [
          "template_id",
          "title",
          "signers"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "configure_template_public_link",
      "title": "Configure Public Template Signing Link (SignLink)",
      "description": "Enables, disables, or updates a reusable self-service public signing link (/s/{slug}) and optional post-signing redirect URL on a single-signer template.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "template_id": {
            "type": "string",
            "description": "The saved template ID."
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether the public signing link (/s/{slug}) is enabled."
          },
          "slug": {
            "type": "string",
            "description": "Optional custom URL slug (lowercase letters, numbers, and hyphens, 3-80 chars)."
          },
          "requireEmailCode": {
            "type": "boolean",
            "description": "When true, requires visitors to enter a one-time verification code emailed to them before opening the document."
          },
          "redirectUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional post-signing redirect URL (https://...) for envelopes spawned from this template."
          }
        },
        "required": [
          "template_id",
          "enabled"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "list_webhook_deliveries",
      "title": "List Standard Webhooks Deliveries",
      "description": "Lists recent webhook deliveries and their payloads, newest first, optionally filtered by status, event type, or ISO timestamp.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "delivered",
              "failed",
              "pending"
            ],
            "description": "Optional delivery status filter."
          },
          "type": {
            "type": "string",
            "description": "Optional event type filter (e.g. 'envelope.sent', 'signer.signed', 'envelope.completed')."
          },
          "since": {
            "type": "string",
            "description": "Optional ISO 8601 timestamp to catch up on deliveries since."
          },
          "limit": {
            "type": "number",
            "description": "Maximum deliveries to return (1-100, default 25)."
          },
          "cursor": {
            "type": "string",
            "description": "Pagination cursor from a previous call."
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "create_embedded_signing_link",
      "title": "Create Embedded Signing Link",
      "description": "Generates a short-lived (15-minute) embedded signing iframe URL (/embed/sign/{token}?origin=...) for a signer whose turn it currently is on an envelope sent with delivery: 'embedded'.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "envelope_id": {
            "type": "string",
            "description": "The sent embedded envelope ID."
          },
          "signer_id": {
            "type": "string",
            "description": "The notified signer ID."
          },
          "origin": {
            "type": "string",
            "description": "Allowed parent frame origin (e.g. https://app.example.com)."
          }
        },
        "required": [
          "envelope_id",
          "signer_id",
          "origin"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "bulk_send_template",
      "title": "Bulk Send Template From CSV",
      "description": "Previews or dispatches a batch of up to 200 envelopes from a saved template using a CSV string of recipient names and email addresses. Set confirm: false (default) to validate and preview rows and receive a batchKey, or confirm: true with batchKey and permittedUseConfirmed: true to send the batch.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "template_id": {
            "type": "string",
            "description": "The saved template ID."
          },
          "csv": {
            "type": "string",
            "description": "CSV string with header row (e.g. name,email,title or <Role> name,<Role> email)."
          },
          "confirm": {
            "type": "boolean",
            "description": "Set false (default) to preview/validate rows; set true with batchKey and permittedUseConfirmed: true to send."
          },
          "batchKey": {
            "type": "string",
            "description": "Batch key returned by the preview call (required when confirm is true)."
          },
          "permittedUseConfirmed": {
            "type": "boolean",
            "description": "Must be true when confirm is true."
          },
          "expiresInDays": {
            "type": "number",
            "description": "Optional signing deadline in days (1-365)."
          },
          "reminderIntervalDays": {
            "type": [
              "number",
              "null"
            ],
            "description": "Optional automatic reminder interval in days (1-30)."
          },
          "requireEmailCode": {
            "type": "boolean",
            "description": "Optional one-time email verification code requirement."
          },
          "signatureMeaning": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "approval",
              "review",
              "responsibility",
              "authorship",
              null
            ]
          },
          "copyRecipients": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "email": {
                  "type": "string"
                }
              },
              "required": [
                "name",
                "email"
              ]
            }
          }
        },
        "required": [
          "template_id",
          "csv"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "update_envelope_signer",
      "title": "Correct Sent Envelope Signer",
      "description": "Updates the name and/or email address of a pending or notified signer on a sent envelope, invalidating their previous signing link and emailing a fresh invitation if it is currently their turn.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "envelope_id": {
            "type": "string",
            "description": "The sent envelope ID."
          },
          "signer_id": {
            "type": "string",
            "description": "The signer ID to update."
          },
          "name": {
            "type": "string",
            "description": "Updated full name for the signer."
          },
          "email": {
            "type": "string",
            "description": "Updated email address for the signer."
          }
        },
        "required": [
          "envelope_id",
          "signer_id",
          "name",
          "email"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "update_envelope_deadline",
      "title": "Update Sent Envelope Deadline",
      "description": "Sets a new signing expiration deadline (1 to 365 days from now) on a sent or expired envelope, reviving expired envelopes and extending active signing links.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "envelope_id": {
            "type": "string",
            "description": "The sent or expired envelope ID."
          },
          "expiresInDays": {
            "type": "number",
            "description": "New deadline in days from now (1-365)."
          }
        },
        "required": [
          "envelope_id",
          "expiresInDays"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "inspect_pdf_layout",
      "title": "Inspect PDF Coordinates & Text Tags",
      "description": "Inspects a PDF document (from pdf_base64, upload_id, or an existing envelope_id) and returns page dimensions, extracted text lines with normalized top-left (0..1) bounding box coordinates (page, x, y, width, height), and any detected {{...}} auto-placement text tags so an agent can deterministically place signature and form fields.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "pdf_base64": {
            "type": "string",
            "description": "Base64-encoded PDF bytes to inspect."
          },
          "upload_id": {
            "type": "string",
            "description": "Upload ID from POST /api/v1/uploads."
          },
          "envelope_id": {
            "type": "string",
            "description": "Existing envelope ID in the authenticated workspace whose source PDF should be inspected."
          },
          "signers": {
            "type": "array",
            "description": "Optional signer candidates ({ id, ref, name, email, order }) used to resolve {{...}} text tags into ready-to-use field placements.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "ref": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "email": {
                  "type": "string"
                },
                "order": {
                  "type": "number"
                }
              },
              "required": [
                "name",
                "email"
              ]
            }
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "render_tagged_pdf",
      "title": "Render Markdown Agreement to Auto-Tagged PDF",
      "description": "Renders a clean, formatted PDF agreement from Markdown text using pdf-lib, preserving unbreakable {{...}} auto-placement text tags (with optional invisible tag ink via hideTagText: true), automatically appending structured signature blocks for signers, and optionally creating a draft or sent envelope in one step.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Title of the agreement (1-160 characters)."
          },
          "markdown": {
            "type": "string",
            "description": "Markdown body of the agreement. May include inline {{text:1:Company:req}}, {{sig:1}}, {{date:1}}, or other {{...}} text tags."
          },
          "signers": {
            "type": "array",
            "description": "Signers for signature block generation and optional envelope creation.",
            "items": {
              "type": "object",
              "properties": {
                "ref": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "email": {
                  "type": "string"
                },
                "roleTitle": {
                  "type": "string"
                },
                "company": {
                  "type": "string"
                },
                "step": {
                  "type": "number"
                },
                "accessCode": {
                  "type": "string"
                },
                "requireEmailCode": {
                  "type": "boolean"
                },
                "signatureMeaning": {
                  "type": "string",
                  "enum": [
                    "approval",
                    "review",
                    "responsibility",
                    "authorship"
                  ]
                }
              },
              "required": [
                "ref",
                "name",
                "email"
              ]
            }
          },
          "appendSignatureBlock": {
            "type": "boolean",
            "description": "When true (default when signers are provided and no {{sig:...}} tag is in markdown), appends a formatted signature block with {{sig:ref}}, {{name:ref}}, and {{date:ref}}."
          },
          "hideTagText": {
            "type": "boolean",
            "description": "When true, draws {{...}} text tags in paper-matched near-invisible ink so they remain machine-extractable for autoPlaceTextTags while staying visually hidden."
          },
          "pageSize": {
            "type": "string",
            "enum": [
              "letter",
              "a4"
            ],
            "description": "Page size: letter (default) or a4."
          },
          "createEnvelope": {
            "type": "boolean",
            "description": "When true, immediately creates an envelope in the workspace from the rendered PDF with autoPlaceTextTags: true."
          },
          "redirectUrl": {
            "type": "string",
            "description": "Optional post-signing redirect URL when createEnvelope is true."
          },
          "metadata": {
            "type": "object",
            "description": "Optional JSON metadata (up to 2 KB) when createEnvelope is true."
          },
          "send": {
            "type": "object",
            "description": "Optional send options when createEnvelope is true (requires write scope).",
            "properties": {
              "permittedUseConfirmed": {
                "type": "boolean"
              },
              "delivery": {
                "type": "string",
                "enum": [
                  "email",
                  "embedded"
                ]
              },
              "expiresInDays": {
                "type": "number"
              },
              "redirectUrl": {
                "type": "string"
              },
              "reminderIntervalDays": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "signatureLevel": {
                "type": "string",
                "enum": [
                  "simple",
                  "advanced",
                  "qualified"
                ]
              }
            },
            "required": [
              "permittedUseConfirmed"
            ]
          }
        },
        "required": [
          "title",
          "markdown"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "get_envelope_field_values",
      "title": "Extract Envelope Field Values & Signer Answers",
      "description": "Returns the structured field placements and signer-submitted answers (text, number, dropdown, checkbox, radio, date, name, attachment) along with a label-keyed valuesByLabel map for an envelope without needing to OCR the PDF.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "envelope_id": {
            "type": "string",
            "description": "The envelope ID to read field values from."
          }
        },
        "required": [
          "envelope_id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "sweep_stalled_envelopes",
      "title": "Sweep Expiring, Stalled & Declined Envelopes",
      "description": "Event-driven wakeup and scheduled audit tool that scans active workspace envelopes for expiring deadlines, stalled notified signers, and recent declines, returning concrete recommended tool actions (remind_envelope, update_envelope_deadline, or triage_declined_envelope).",
      "inputSchema": {
        "type": "object",
        "properties": {
          "expiringWithinHours": {
            "type": "number",
            "description": "Include sent envelopes expiring within this many hours (default: 72)."
          },
          "stalledHours": {
            "type": "number",
            "description": "Include notified signers who have not signed after this many hours (default: 48)."
          }
        },
        "additionalProperties": false
      }
    }
  ]
}