# Working with AI agents Source: https://developers.myhero.so/ai/overview HERO's built-in AI agents for drafting, reviewing, and analysing documents — accessible via the REST API and MCP server, with skills for contracts, NDAs, compliance, and more. HERO ships several specialised AI agents accessible via the `/api/ai-agent` endpoints available via the [**API**](../api-reference/ai/) as well as the [**MCP**](../mcp/overview) server. ## Tools Agents can call tools to read and write documents, tables, projects, and the web. \ The catalog covers editor operations, table data and schema, project trees, web search, and workflow control. See the [Tool catalog](../mcp/tools) for the full list. ## Skills * **Compliance & Policy Drafting** — Draft internal compliance policies, employee handbooks, whistleblower policies, anti-bribery policies, and corporate governance documents. * **Contract Drafting** — Draft professional legal contracts, agreements, and formal documents with proper structure, defined terms, and smart placeholders. * **Contract Review** — Review existing contracts for risks, missing protections, ambiguities, and one-sided terms. * **Dashboard** — Build live dashboards from the project * **Document Design** — Compose polished, well-structured documents (reports, briefs, proposals, guides, playbooks, FAQs, one-pagers) from the layout blocks and colour system of HERO, with restraint and meaning. * **Document Summarisation** — Summarise legal documents, contracts, or any document into concise briefs, executive summaries, or key-point extractions. * **Legal Letter Drafting** — Draft demand letters, cease and desist notices, legal opinions, engagement letters, and formal legal correspondence. * **NDA Review** — Review and analyse non-disclosure / confidentiality agreements for risks, missing clauses, and one-sided terms. * **Privacy & Data Protection** — Draft or review privacy policies, data processing agreements, GDPR compliance documents, and data breach response plans. # Check document access Source: https://developers.myhero.so/api-reference/access/get-document-access get /access/document/{documentId} Returns `true` if the authenticated user can access the document identified by `documentId`, `false` otherwise. Does not reveal whether the document exists. # Check email existence Source: https://developers.myhero.so/api-reference/access/get-email-exists get /access/exists/{email} Returns `true` if a user account is registered for `email`, `false` otherwise. Useful for invite flows that need to differentiate between existing and new users. # Check project access Source: https://developers.myhero.so/api-reference/access/get-project-access get /access/project/{projectId} Returns `true` if the authenticated user can access the project identified by `projectId`, `false` otherwise. # Run an AI agent Source: https://developers.myhero.so/api-reference/ai/ai-chat post /ai-agent Runs the general AI agent and returns the complete response as a `chatMessages` array. Use the streaming endpoint (`/stream`) when incremental output is preferred. 429 responses carry a gate message as a `chatMessages` array rather than an error object. A call that would email people outside the chat (sending for signature, sharing, inviting) is held, not run: it comes back in the message's `metadata.pendingActions`, to confirm with `POST /ai-agent/actions/{actionId}/confirm`. # Confirm a held action Source: https://developers.myhero.so/api-reference/ai/ai-confirm-action post /ai-agent/actions/{actionId}/confirm Sends what a held action shows, as the user. Nothing is emailed by the chat itself: sending for signature, sharing and inviting wait for this call. It runs at most once, however many times it is called, and checks everything again first; if what would go out has changed since, nothing is sent. Returns the action as it stands, with its `outcome`; an action that was no longer pending comes back unchanged. # Decline a held action Source: https://developers.myhero.so/api-reference/ai/ai-decline-action post /ai-agent/actions/{actionId}/decline Cancels a held action: nothing is sent. Returns the action as it stands; one that was no longer pending comes back unchanged. # Delete an AI chat session Source: https://developers.myhero.so/api-reference/ai/ai-delete-session delete /ai-agent/session/{sessionId} Deletes the stored conversation history for a session and discards its undo stack, including the editor snapshots the AI captured before each edit. Call this when the user deletes a chat; without it the session and its snapshots linger until the 7-day TTL. Idempotent — deleting an unknown or already-deleted session succeeds. # Generate an HTML block Source: https://developers.myhero.so/api-reference/ai/ai-generate-html-block post /ai-agent/generate-html Generates a self-contained interactive HTML widget — a calculator, dashboard, slide deck, prototype or game — for an editor HTML block, or revises one when `currentHtml` is given. The widget follows HERO's design system and is responsive. Context comes from the page (`context`), references in the prompt, picked `mentions` and `attachments`. The response streams as Server-Sent Events: `delta` events carry raw model output as it is written, then one `done` event carries the finished HTML (or an `error` event). Validation, plan and quota failures are answered as JSON before any stream starts. Insert the result with `write_document_markdown` as an ` ```html-block ` fence, or store it with `POST /media/html` and set the returned `_id` as an `htmlBlock` node's `resourceId`. # Retrieve AI usage Source: https://developers.myhero.so/api-reference/ai/ai-get-usage get /ai-agent/usage Returns the authenticated user's current token consumption (`usedTokens`), plan limit (`tokenLimit`), the timestamp when the usage counter resets (`tokenResetAt`), and tokens spent on the user's own API key (`ownKeyTokens`), which is reported but never limited. Returns `null` when no billing seat is found. # Read an HTML block's AI thread Source: https://developers.myhero.so/api-reference/ai/ai-html-block-thread get /ai-agent/html-block-thread Returns everything asked and answered about one HTML block, oldest first: edits from the block's own composer and from an AI chat focused on it. Only the document's editors can read it. # Predict the rest of a sentence Source: https://developers.myhero.so/api-reference/ai/ai-inline-completion post /ai-agent/inline-completion Predicts how the writer will finish the sentence at the caret — the editor's ghost text. `before` is the document up to the caret; `after`, `documentTitle`, `section` and `terms` are context. Returns the continuation exactly as it goes after the caret, including any leading space, or an empty string when there is nothing confident to suggest. # List a chat's held actions Source: https://developers.myhero.so/api-reference/ai/ai-list-actions get /ai-agent/actions Returns the actions the AI held for confirmation in a chat session, oldest first, each as it stands now: a chat restored after a reload shows them from this. # Stream an AI agent Source: https://developers.myhero.so/api-reference/ai/ai-stream post /ai-agent/stream Runs the general AI agent and streams its response as Server-Sent Events over `text/event-stream`. Each event carries a `type` (delta, tool_call, tool_result, done, or error) and a per-type payload. The `done` event includes `sessionId`, `hasUndo`, and a `changes` summary of entities modified during the run. A call that would email people outside the chat (sending for signature, sharing, inviting) is held, not run: its `tool_result` carries a `pendingAction` to confirm with `POST /ai-agent/actions/{actionId}/confirm`. The next message in the session withdraws any still unanswered. # Transform text Source: https://developers.myhero.so/api-reference/ai/ai-transform-text post /ai-agent/transform-text Applies a named transformation (`operation`) to the provided `text` and returns the rewritten string along with token `usage`. Supported operations include rephrase, fix grammar, simplify, translate, shorten, summarize, and others. # Undo last AI agent run Source: https://developers.myhero.so/api-reference/ai/ai-undo post /ai-agent/undo Reverses the most recent AI-driven changes for the given `sessionId` and truncates that exchange from the conversation history. Returns `success`, `hasUndo` (whether further undo steps are available), per-domain `results`, and a `changes` summary of what was restored. # Remove an AI key Source: https://developers.myhero.so/api-reference/ai/delete-ai-key delete /ai-keys/{provider} Deletes the stored key and returns that vendor to the plan's monthly credits. # List AI key settings Source: https://developers.myhero.so/api-reference/ai/list-ai-keys get /ai-keys Returns, for each supported vendor, whether a key is stored, its last four characters, and whether requests for that vendor run on the key or on the plan's monthly credits. The key itself is never returned. # Store an AI key Source: https://developers.myhero.so/api-reference/ai/set-ai-key put /ai-keys/{provider} Encrypts and stores a vendor API key, and switches that vendor to it. Replaces any existing key. Rejects a key that does not look like the named vendor's. # Choose who pays for a vendor Source: https://developers.myhero.so/api-reference/ai/set-ai-key-source post /ai-keys/{provider}/source Switches a vendor between the user's own key and the plan's monthly credits. Switching to `own_key` requires a stored key. # Check a stored key works Source: https://developers.myhero.so/api-reference/ai/verify-ai-key post /ai-keys/{provider}/verify Makes a minimal live call to the vendor with the stored key. Returns whether it was accepted, and records the time of a success. # Create an API key Source: https://developers.myhero.so/api-reference/api-keys/create-api-key post /api-key Creates a personal API key that authenticates as the calling user against the standard REST API. The returned `accessToken` is shown ONCE — store it securely. Workspace scope and expiry follow the same rules as MCP personal access tokens. # List API keys Source: https://developers.myhero.so/api-reference/api-keys/list-api-keys get /api-key Returns the calling user's REST API keys (active only). Hashed tokens are never returned. # Revoke an API key Source: https://developers.myhero.so/api-reference/api-keys/revoke-api-key delete /api-key/{tokenId} Marks the API key as revoked. Subsequent requests using it return 401. # Cancel a run Source: https://developers.myhero.so/api-reference/automations/cancel-automation-run post /automation/runs/{runId}/cancel Stops a run that is queued or already going. A queued run ends at once. A running one finishes the step it is on — so a half-written document is never left behind — and stops before the next. Steps that already ran are not undone; use revert for that. # Draft an automation from a description Source: https://developers.myhero.so/api-reference/automations/compose-automation-draft post /automation/draft Turns plain English into a schema-validated draft through one constrained model call with no tools. It pre-fills the form and creates nothing; any `hero:` reference it emits goes through the same resolution a hand-authored save does, so an invented id is rejected before the form is populated. # Create an automation Source: https://developers.myhero.so/api-reference/automations/create-automation post /automation Creates an automation. Every `hero:` reference in the actions is resolved before the automation is stored, so a reference that does not exist — or points outside the project's scope — is refused here rather than failing on a later run. Schedules must be at least five minutes apart. # Delete an automation Source: https://developers.myhero.so/api-reference/automations/delete-automation delete /automation/{id} # Run one workflow method Source: https://developers.myhero.so/api-reference/automations/execute-workflow-method post /automation/method Executes a single workflow step — the same methods an automation's steps run through, with the same scoping and bounds — without creating an automation. The project boundary is derived from the entity the spec names (its table or document), never from the body; `projectId` is required by document.create, document.find, table.createTable, notify.inApp and notify.email, which name no existing entity to derive it from. Structural references (`rowRef`, `documentRef`) take a bare id. # Read one automation Source: https://developers.myhero.so/api-reference/automations/get-automation get /automation/{id} # Read one run Source: https://developers.myhero.so/api-reference/automations/get-automation-run get /automation/runs/{runId} Includes per-step results and, for runs with an AI step, the session transcript. # List an automation's runs Source: https://developers.myhero.so/api-reference/automations/get-automation-runs get /automation/{id}/runs Most recent first. A succeeded run means the run finished, not that it did what was wanted. # List the caller's notifications Source: https://developers.myhero.so/api-reference/automations/list-automation-notifications get /automation/notifications # List a project's automations Source: https://developers.myhero.so/api-reference/automations/list-automations get /automation Returns every automation whose home project is `projectId`. An automation may act in other projects — see its `scope.projectIds` — but it is listed only under the one it belongs to. # Mark notifications as read Source: https://developers.myhero.so/api-reference/automations/mark-automation-notifications-read post /automation/notifications/read # Rebuild an automation from an edited description Source: https://developers.myhero.so/api-reference/automations/regenerate-automation post /automation/{id}/regenerate Re-runs the composer against a new description and replaces what it determines — name, triggers, conditions and actions. Behavior, notifications and the enabled state are kept, as are any connectors already chosen. Manual edits to the steps are lost. # Resolve a set of references Source: https://developers.myhero.so/api-reference/automations/resolve-automation-references post /automation/resolve-references Reports what each `hero:` reference currently points at, and which no longer resolve. Used by the form's reference panel; it changes nothing. # Revert a run Source: https://developers.myhero.so/api-reference/automations/revert-automation-run post /automation/runs/{runId}/revert Undoes what the run changed inside HERO. Anything it did outside HERO — a sent email, a webhook delivery — cannot be undone and is recorded on the run instead. # Rotate the webhook secret Source: https://developers.myhero.so/api-reference/automations/rotate-automation-webhook-secret post /automation/{id}/webhook-secret Returns the new secret once. Only a hash is stored, so it cannot be retrieved again. The previous secret stops working immediately. # Run an automation now Source: https://developers.myhero.so/api-reference/automations/run-automation post /automation/{id}/run Queues a run immediately. `text` is passed to the run as untrusted data, wrapped so an AI step treats it as input rather than as instructions. `source` marks a run started by an in-app button, which needs only read access to the project. # Search entities an automation may reference Source: https://developers.myhero.so/api-reference/automations/search-automation-mentions get /automation/mention-search Feeds the `@` picker and the table/column/document selectors. Results are restricted to the automation's scope, so the picker can never offer something the save would refuse. # Update an automation Source: https://developers.myhero.so/api-reference/automations/update-automation patch /automation/{id} Owner or project admin only: a run executes with the owner's credentials, so changing what it does is a different act from reading it. # Retrieve a block Source: https://developers.myhero.so/api-reference/blocks/get-block-by-id get /block/{id} Returns a single block document (clause block, clause reference, placeholder, term definition, or image block) by its `_id`. Access is verified against the block's parent document. # Retrieve multiple blocks Source: https://developers.myhero.so/api-reference/blocks/get-blocks-by-ids post /block/get-blocks Accepts an array of block IDs and returns the matching block documents. Access is validated against each block's parent document; if any document is inaccessible the entire request is rejected with 403. # Create a clause reference Source: https://developers.myhero.so/api-reference/clauses/create-clause-reference post /clause-reference Creates a clause reference linking a block in a document to a cross-document clause hierarchy. The caller must supply a pre-generated `_id`, `blockId`, `documentId`, and `hierarchy` path. Requires read access to the target document; the reference itself is written into a document the caller can edit. Returns the full `ClauseReference` record. # Paste clause references Source: https://developers.myhero.so/api-reference/clauses/create-pasted-clause-references post /clause-reference/paste Duplicates clause references during a paste operation by mapping old reference IDs to new IDs supplied in `oldToNewClauseReferenceIds`. Verifies read access to all source documents and edit access to the destination `documentId`. Returns the newly created `ClauseReference` array. # Retrieve a clause block Source: https://developers.myhero.so/api-reference/clauses/get-clause-block-by-id-or-hierarchy get /clause-reference/get-clause/{clauseReferenceId} Looks up the clause block associated with a clause reference, first by block ID and then by the reference's `hierarchy` string. Returns the `clauseBlockResults` array and the `clauseReferenceRecord`. Responds with HTTP 404 when the block is not found but still includes a placeholder entry with `isNotFound: true`. # Retrieve a clause reference Source: https://developers.myhero.so/api-reference/clauses/get-clause-reference-by-id get /clause-reference/{referenceId} Returns the `ClauseReference` record identified by `referenceId`. Requires read access to the document referenced by the record. # Retrieve multiple clause references Source: https://developers.myhero.so/api-reference/clauses/get-clause-references-by-ids post /clause-reference/get-references Bulk-fetches `ClauseReference` records for the IDs supplied in `data`. Verifies that the authenticated user has read access to every document referenced. Returns the matching records. # LLM-friendly site map Source: https://developers.myhero.so/api-reference/discovery/get-llms-txt get /llms.txt Curated, markdown-formatted overview of the site for AI crawlers, per the llmstxt.org convention. # Robots exclusion rules Source: https://developers.myhero.so/api-reference/discovery/get-robots-txt get /robots.txt Standard robots.txt at the site root telling crawlers which paths are allowed/disallowed and pointing at the sitemap. # Security disclosure contacts Source: https://developers.myhero.so/api-reference/discovery/get-security-txt get /.well-known/security.txt RFC 9116 security.txt with contact info for security researchers reporting vulnerabilities. # Public URL sitemap Source: https://developers.myhero.so/api-reference/discovery/get-sitemap-xml get /sitemap.xml XML sitemap of publicly indexable URLs, per the sitemaps.org schema. # Accept a document transfer Source: https://developers.myhero.so/api-reference/documents/accept-document-transfer post /document/transfer/accept/{transferId} Accepts a pending transfer identified by `transferId`, copying the documents into the caller's target workspace or project. The caller's authenticated email must match the transfer's `recipientEmail`. Returns a `path` pointing to the newly created documents on success. # Create a document Source: https://developers.myhero.so/api-reference/documents/create-document post /document Creates a new document inside the given project. Requires a `projectId` in the request body; the caller must have create permission on that project and a plan that permits document creation. Returns the created document including its `_id`, `name`, and timestamps. # Create a document transfer Source: https://developers.myhero.so/api-reference/documents/create-document-transfer post /document/transfer/create Initiates a transfer of one or more documents to another user by `email`. Creates a transfer record and sends an email notification; if the recipient is not yet registered, an invitation link is included in the email. # Decline a document transfer Source: https://developers.myhero.so/api-reference/documents/decline-document-transfer post /document/transfer/decline/{transferId} Marks a pending transfer as declined. Only the intended recipient (`recipientId`) may decline; the transfer must still be in a valid (non-expired, non-accepted) state. # Delete documents Source: https://developers.myhero.so/api-reference/documents/delete-documents-many delete /document/delete-many Soft-deletes the given documents and all of their descendants by setting `isDeleted: true`. Returns the full list of affected document `_id`s, or `false` if the operation fails. # Stream the latest .docx blob Source: https://developers.myhero.so/api-reference/documents/export-docx-blob get /document/docx/{documentId}/export Streams the .docx blob directly with an attachment Content-Disposition header. Used by tree-export and ad-hoc download flows. # Retrieve document preview content Source: https://developers.myhero.so/api-reference/documents/get-doc-preview-content-by-document-id get /document/preview-content/{fileId} Returns the ProseMirror JSON content of a document, derived from its Y.js collaborative state. If the caller lacks access, returns a restricted-access placeholder node instead of an error. # Retrieve a document Source: https://developers.myhero.so/api-reference/documents/get-document get /document/{documentId} Retrieves a single document by `documentId`. Returns the document's top-level metadata; block content lives under separate endpoints. Returns a 404 shape `{ _id, isNotFound: true }` if the document does not exist or has been soft-deleted. # Retrieve document editor data Source: https://developers.myhero.so/api-reference/documents/get-document-initial-data get /document/initial-data/{documentId} Returns the aggregated payload required to bootstrap the document editor for `documentId`. Includes document settings, table references, referenced rows, blocks, and clause references in a single response. # Retrieve PDF template data Source: https://developers.myhero.so/api-reference/documents/get-document-pdfdata get /document/pdf/{documentId} Retrieves the stored PDF template payload for a document of type `EXTERNAL/PDF`. Returns 404 if the document does not exist or has no associated template, and 500 if the document is not a PDF external template. # Retrieve document settings Source: https://developers.myhero.so/api-reference/documents/get-document-settings get /document-settings/{documentId} Returns the settings record for the document identified by `documentId`, including `listTemplateId` and `importedTermsFileId`. Requires read access to the document. # List document transfers Source: https://developers.myhero.so/api-reference/documents/get-document-transfers get /document/transfers Returns all document transfers where the authenticated user is either the sender or the recipient. Results are sorted newest-first. # Retrieve multiple documents Source: https://developers.myhero.so/api-reference/documents/get-documents post /document/get-documents Fetches a batch of documents by their `_id`s. The caller must have access to all requested documents; a 403 is returned if any are inaccessible. # List documents in a project Source: https://developers.myhero.so/api-reference/documents/get-documents-by-project-id get /document/all/{projectId} Lists all documents belonging to `projectId`. Pass `includeCollaborators=true` to include per-document collaborator arrays (requires owner or admin role; someone with access only to individual documents gets just their own entry). Pass `includeFolders=true` to include folder-type documents in the result. `sort` and `limit` give newest-first paging; with `includeFolders=true`, ancestor folders of the windowed documents are appended even when that exceeds `limit`. # List interconnected document IDs Source: https://developers.myhero.so/api-reference/documents/get-documents-interconnection post /document/get-interconnection Traverses the document graph starting from the provided `documentIds` and returns all reachable related document IDs. Useful for determining the full set of documents that would be affected by a transfer or copy operation. `interconnectionsBySource` attributes the direct edges that could be pinned to a single source document (source document id -> the ids it references); edges resolved in a batch shared across documents are omitted rather than mis-attributed. # Get signed URL for the .docx blob Source: https://developers.myhero.so/api-reference/documents/get-docx-download-url get /document/docx/{documentId}/download-url Returns a short-lived signed URL the browser can use to fetch the .docx blob from object storage, plus the `seededAt` timestamp (or null) used to coordinate first-open seeding. # Count table views embedded in documents Source: https://developers.myhero.so/api-reference/documents/get-embedded-table-view-count post /document/embedded-table-views Returns how many distinct table views the given documents embed between them. Used to decide whether to offer the "include table views" option when sharing or sending. # Retrieve PDF initial data Source: https://developers.myhero.so/api-reference/documents/get-pdfinitial-data get /document/initial-data/pdf/{documentId} Returns the table references and referenced rows associated with a PDF document. This data is used to populate dynamic fields when rendering the PDF template. # Invite a user to a document Source: https://developers.myhero.so/api-reference/documents/invite-user-to-document post /document/invite-user Invites a single user by `email` to a document with the specified `role`. Returns counts of invitations sent, documents invited, and users invited. # Invite users to documents Source: https://developers.myhero.so/api-reference/documents/invite-users-to-documents post /document/invite-users Invites one or more users by `emails` to one or more `documentIds` at the specified `role`. Returns counts of invitations sent, documents invited, and users invited. # Mark a DOCX as Y.Doc-seeded Source: https://developers.myhero.so/api-reference/documents/mark-docx-seeded post /document/docx/{documentId}/mark-seeded Sets `external.seededAt` on the DocumentDoc after the browser has converted the .docx blob into the collaborative Y.Doc. Subsequent opens use the Y.Doc instead of re-seeding. # Copy documents to a location Source: https://developers.myhero.so/api-reference/documents/paste-documents post /document/paste Creates deep copies of the specified documents (and their children) under a new `parentId`. Both the source documents and the destination workspace must be accessible to the caller. # Remove a document collaborator Source: https://developers.myhero.so/api-reference/documents/remove-collaborator post /document/remove-collaborator Removes a collaborator by `userId` from a single document and cleans up their access from any parent folder hierarchy if they no longer have access to other documents in those folders. # Remove a collaborator from documents Source: https://developers.myhero.so/api-reference/documents/remove-collaborator-from-documents post /document/remove-collaborator-many Removes a collaborator by `userId` from multiple documents at once. Pass `cancelInvites: true` along with `email` to also cancel any pending invitations for that user in the affected project. Returns a `modifiedCount` of updated documents. # Persist updated .docx blob Source: https://developers.myhero.so/api-reference/documents/save-docx-blob post /document/docx/{documentId}/save Accepts a base64-encoded .docx produced by the browser DOCX instance and writes it to object storage, replacing the previous blob in-place. # Update a collaborator's role Source: https://developers.myhero.so/api-reference/documents/update-collaborator-role post /document/update-collaborator-role Changes the role of a collaborator on a single document. Requires workspace-level edit permission. Returns 404 if the document does not exist. # Update document settings Source: https://developers.myhero.so/api-reference/documents/update-document-settings put /document-settings/{documentId} Applies a partial settings update to the document identified by `documentId`. The `setting` object may contain any of `listTemplateId`, `importedTermsFileId` (null unlinks it), `insertMissingLevels` and `hideLoneClauseNumbers`; any other key is rejected. Requires edit access to the document. Returns `true` on success. # Update many documents Source: https://developers.myhero.so/api-reference/documents/update-documents-many put /document/update-many Updates metadata (name, parentId, icon, published settings, etc.) for one or more documents in a single call. If any `parentId` changes are included, circular-reference validation is run and folder-level collaborator permissions are propagated automatically. # Export to PDF Source: https://developers.myhero.so/api-reference/export/convert-doc-to-pdf post /export/doc-to-pdf Converts one or more base64-encoded DOCX files to PDF via LibreOffice and returns the results as base64-encoded PDF strings. Each item in `data` must include a `documentId` (for permission checks) and the base64 `docx` content. Returns an array of `{ documentId, pdf }` objects. # Retrieve export data for documents Source: https://developers.myhero.so/api-reference/export/get-export-documents-data post /export/get-documents-data Assembles full export payloads for the requested `documentIds` within a project. Each payload includes the document's ProseMirror block content, resolved clause and table references, and list-template settings. Requires read access to all specified documents. # Begin OAuth authorization Source: https://developers.myhero.so/api-reference/integrations/begin-authorize post /integrations/{provider}/authorize Initiates the OAuth authorization flow for the specified `provider` (e.g. `gmail`, `google_drive`). The optional `device` query parameter (`web` or `desktop`) determines the post-callback redirect target. Set `write=1` to additionally request the provider's write scopes, which automations need in order to send mail or modify files — every existing connection is read-only and must be re-consented to gain them. Returns a `url` the client must open; the callback then hands the client a `ticket` to pass to the confirm route, which links the account. # Finish connecting an integration Source: https://developers.myhero.so/api-reference/integrations/confirm-integration post /integrations/{provider}/confirm Links the account the user consented to, using the `ticket` the OAuth callback handed back to the client. Only the user who began the authorization can confirm it, once, within five minutes. # Disconnect an integration Source: https://developers.myhero.so/api-reference/integrations/disconnect-integration delete /integrations/{provider} Revokes and removes the OAuth connection for the specified `provider` from the authenticated user's account. Returns `true` on success. # Handle OAuth callback Source: https://developers.myhero.so/api-reference/integrations/handle-integration-callback get /integrations/{provider}/callback Receives the OAuth authorization callback from the provider, holds the `code` under a one-time `ticket`, and responds with an HTML bounce page that JS-redirects the user back to the web or desktop app with that ticket. Links nothing until the client confirms it. Uses a bounce page rather than a bare 302 to support custom-scheme deeplinks on macOS. # List connected integrations Source: https://developers.myhero.so/api-reference/integrations/list-integrations get /integrations Returns all OAuth integration connections for the authenticated user. Each entry includes the `provider`, connection `status`, optional `accountLabel`, granted `scopes`, and `createdAt` timestamp. # Download Claude Desktop extension Source: https://developers.myhero.so/api-reference/mcp/mcp-download-claude-desktop-extension get /mcp/install/claude-desktop Downloads the HERO Claude Desktop Extension package (`hero.dxt`) as an `application/zip` binary. No authentication required. Returns 503 if the extension has not yet been built on this server. # Terminate an MCP session Source: https://developers.myhero.so/api-reference/mcp/mcp-http-delete delete /mcp Terminates the active MCP session identified by the required `mcp-session-id` header, freeing server-side resources. Returns an empty JSON object on success. # Open an MCP server-sent event stream Source: https://developers.myhero.so/api-reference/mcp/mcp-http-get get /mcp Opens a server-sent event stream for an existing MCP session identified by the required `mcp-session-id` header. Used by MCP clients to receive server-initiated messages over the Streamable HTTP transport. # Send a JSON-RPC request to the MCP server Source: https://developers.myhero.so/api-reference/mcp/mcp-http-post post /mcp Implements the MCP Streamable HTTP transport (spec 2025-03-26). Accepts a JSON-RPC 2.0 message or batch array whose shape varies per method (`initialize`, `tools/call`, `resources/list`, etc.). Include `mcp-session-id` to resume an existing session; omit it to start a new one. The response may be a single JSON-RPC reply or an SSE stream depending on the request. # Redirect to MCP install deeplink Source: https://developers.myhero.so/api-reference/mcp/mcp-install-client get /mcp/install/{client} Issues a 302 redirect to the client-specific deeplink URL for installing the HERO MCP server (e.g. `cursor`, `vscode`). No authentication required. Returns 404 for unknown `client` identifiers. # Invoke an MCP tool Source: https://developers.myhero.so/api-reference/mcp/mcp-invoke-tool post /mcp/tools/{toolName} Executes the MCP tool identified by `toolName` with the key-value `args` map provided in the request body. The OAuth token is forwarded to the tool for user-scoped operations. Returns the tool's result in `data`. # List MCP tools Source: https://developers.myhero.so/api-reference/mcp/mcp-list-tools get /mcp/tools Returns the catalog of MCP tools available to the authenticated user along with system `instructions`. Each tool entry includes its `name`, `description`, JSON-Schema `parameters`, and behavior `annotations`. Requires OAuth authentication. # Connect via legacy SSE transport Source: https://developers.myhero.so/api-reference/mcp/mcp-sse-connect get /mcp/sse Opens a server-sent event stream using the legacy MCP SSE transport. Deprecated — prefer the Streamable HTTP transport (`POST /mcp`). The stream stays open until the session closes or the client disconnects. Requires OAuth authentication. # Post a message to a legacy SSE session Source: https://developers.myhero.so/api-reference/mcp/mcp-sse-message post /mcp/messages Delivers a JSON-RPC message to an active legacy SSE session identified by the `sessionId` query parameter. The server pushes the response back over the SSE stream. Deprecated — prefer the Streamable HTTP transport. # Upload an audio file Source: https://developers.myhero.so/api-reference/media/create-audio post /media/audio Uploads an audio asset (mp3/wav/m4a/ogg/aac up to 50MB) and stores its metadata. The raw audio bytes are sent as the `application/octet-stream` request body; metadata travels in the query string. Returns the audio record including its `_id`, `mimeType` and a signed URL valid for 6 hours. # Store an HTML block document Source: https://developers.myhero.so/api-reference/media/create-html post /media/html Stores one version of an HTML block's document (up to 512 KB) for the document `documentId`, and returns its `_id`. An `htmlBlock` node refers to it by its `resourceId` attribute. Every save is a new file; existing ones are never overwritten. `previousHtmlId` is the version this one replaces on the block: the data switches its saver turned on there stay on, and `droppedSwitches` lists the ones that didn't. Requires edit access to the document. # Upload an image Source: https://developers.myhero.so/api-reference/media/create-image post /media/image Uploads an image asset and stores its metadata. The raw image bytes are sent as the `application/octet-stream` request body; metadata travels in the query string. Returns the image record including its `_id` and a signed URL valid for 6 hours. Supply either `documentId` (document-scoped) or `tableId` (table-scoped). # Upload a video Source: https://developers.myhero.so/api-reference/media/create-video post /media/video Uploads a video asset (mp4/webm/quicktime up to 100MB) and stores its metadata. The raw video bytes are sent as the `application/octet-stream` request body; metadata travels in the query string. Returns the video record including its `_id`, `mimeType` and a signed URL valid for 6 hours. # Delete an image Source: https://developers.myhero.so/api-reference/media/delete-image delete /media/image/{imageId} Deletes the image record identified by `imageId` and removes it from object storage. Requires edit access to the document the image belongs to. Returns `true` on success. # Copy an HTML block document to another document Source: https://developers.myhero.so/api-reference/media/duplicate-html post /media/html/{htmlId}/duplicate Copies a stored HTML block version into the document `documentId` (e.g. when a block is pasted there) and returns the copy's `_id`. Returns the same `_id` when it already belongs to that document. Requires access to the source and edit access to the target. # Retrieve audio URL Source: https://developers.myhero.so/api-reference/media/get-audio-by-id get /media/audio/{audioId} Returns a signed URL for the audio identified by `audioId`. The cached signed URL is reused if still valid; otherwise a new one is generated and persisted. Requires read access to the document the audio belongs to. # Retrieve an HTML block document Source: https://developers.myhero.so/api-reference/media/get-html-by-id get /media/html/{htmlId} Returns the HTML of a stored HTML block version as JSON. Requires access to the document it belongs to. # Get an HTML block's render URL Source: https://developers.myhero.so/api-reference/media/get-html-render-url get /media/html/{htmlId}/render-url Returns the API-relative `path` an HTML block renders from: a page for an iframe, signed for one hour, and `widget`: whether the caller may run the widget's connected data on the document `documentId` (by default the HTML's own document), or null for a widget without connections. Requires access to the document the HTML belongs to. # Retrieve image URL Source: https://developers.myhero.so/api-reference/media/get-image-by-id get /media/image/{imageId} Returns a signed URL for the image identified by `imageId`. The cached signed URL is reused if still valid; otherwise a new one is generated and persisted. Requires read access to the document the image belongs to. # Retrieve video URL Source: https://developers.myhero.so/api-reference/media/get-video-by-id get /media/video/{videoId} Returns a signed URL for the video identified by `videoId`. The cached signed URL is reused if still valid; otherwise a new one is generated and persisted. Requires read access to the document the video belongs to. # Render an HTML block Source: https://developers.myhero.so/api-reference/media/render-html get /media/html/{htmlId}/render Serves a stored HTML block as a page for a sandboxed iframe, from a URL issued by `GET /media/html/{htmlId}/render-url`. The response's `Content-Security-Policy` sandboxes the page into an opaque origin, even when opened directly, and allows no network access beyond jsDelivr, cdnjs and unpkg. # Replace image content Source: https://developers.myhero.so/api-reference/media/update-image put /media/image/{imageId} Replaces the binary content of an existing image in object storage and refreshes its signed URL. The raw image bytes are sent as the `application/octet-stream` request body. Requires edit access to the document the image belongs to. Returns `true` on success. # List organizations Source: https://developers.myhero.so/api-reference/organizations/get-all-organizations get /organization/all Returns all organizations the authenticated user is a member of, including personal and shared organizations. # Retrieve an organization Source: https://developers.myhero.so/api-reference/organizations/get-organization-by-id get /organization/{orgId} Returns the full organization document for `orgId`. The caller must be an `owner` or `member` of the organization; 403 is returned otherwise. # Retrieve default organization Source: https://developers.myhero.so/api-reference/organizations/get-user-default-organization get /organization/default Returns the authenticated user's personal (default) organization, or `null` if none has been created yet. # Copy projects to a location Source: https://developers.myhero.so/api-reference/projects/create-pasted-projects post /project/paste Creates deep copies of one or more projects (and all their documents) into the target workspace or project. The caller must have access to every source project and the destination. # Create a project Source: https://developers.myhero.so/api-reference/projects/create-project post /project Creates a new project inside the specified workspace. Subject to the organization's plan limit on project count. Returns the created project, or `null` if creation fails. # Delete projects Source: https://developers.myhero.so/api-reference/projects/delete-many-projects delete /project/many/{projectIds} Soft-deletes multiple projects supplied as a comma-separated list of IDs in the path. Returns the array of deleted project IDs. # Delete a project Source: https://developers.myhero.so/api-reference/projects/delete-project delete /project/{projectId} Soft-deletes a project by setting `isDeleted: true` and asynchronously cleans up its inner data. Returns the deleted `projectId` string on success. # List all projects the user can access Source: https://developers.myhero.so/api-reference/projects/get-all-user-projects get /project/user/all Returns a lean list (`_id`, `name`, `icon`, `reference`, `workspaceId`) of every project the caller can access across all of their workspaces. Powers global navigation search. # Retrieve project initial data Source: https://developers.myhero.so/api-reference/projects/get-project-initial-data get /project/initial-data/{projectId} Returns the full aggregated payload needed to initialize the project view, including documents, tables, rows, columns, cells, and blocks for `projectId`. # Retrieve project tree data Source: https://developers.myhero.so/api-reference/projects/get-project-tree-data get /project/get-tree-data/{projectId} Returns the project metadata and its flat list of documents in a single response. Used to populate the document sidebar tree for `projectId`. # List projects in a workspace Source: https://developers.myhero.so/api-reference/projects/get-projects-in-workspace get /project/all/{workspaceId} Returns all projects the caller has access to within the given `workspaceId`. # Retrieve a project Source: https://developers.myhero.so/api-reference/projects/get-single-project get /project/{projectId} Retrieves a single project by `projectId`. Returns `null` in the data field if the project does not exist. Returns 403 if the caller does not have access. # Update a project Source: https://developers.myhero.so/api-reference/projects/update-project put /project/{projectId} Updates one or more metadata fields (`name`, `description`, `reference`, `icon`, `emoji`) for the given project. Requires workspace edit permission. Returns `true` on success, `false` on failure. # Authenticate to a published doc Source: https://developers.myhero.so/api-reference/published/authenticate-published-document post /published/{publishedId}/auth Validates a viewer's password against a password-protected published portal. Returns a signed token that grants read access; include it as `user-published-token` on subsequent document requests. 403 indicates an incorrect password. # Retrieve published dashboard info Source: https://developers.myhero.so/api-reference/published/get-published-dashboard-info get /published/{projectId}/dashboard-info Returns the list of published documents, their publishers' profiles, project branding, and configured published domains for `projectId`. Requires the caller to be the project owner or have workspace edit permission. # Retrieve a published document Source: https://developers.myhero.so/api-reference/published/get-published-document-data get /published/{publishedId}/document Returns the ProseMirror content and metadata for a single published document identified by `publishedId`. Enforces domain password authentication via the `user-published-token` header when the portal is password-protected. Pass `exclContent=true` to skip fetching document content. # List published domains Source: https://developers.myhero.so/api-reference/published/get-published-domains get /published/{projectId}/domains Returns the project document with its `published` domain array for `projectId`. Each domain entry includes its slug, optional password hash, disabled flag, and homepage document ID. # Retrieve published homepage ID Source: https://developers.myhero.so/api-reference/published/get-published-homepage get /published/home Resolves the portal slug from the request and returns the `homepageId` of its first published domain. 404 when the portal has no homepage configured. # Retrieve a published HTML block document Source: https://developers.myhero.so/api-reference/published/get-published-html get /published/media/html/{publishedId}/{htmlId} Returns, as JSON, the HTML of an HTML block on the published document `publishedId`. Verifies the HTML belongs to that document and that the document is currently published. # Get a published HTML block's render URL Source: https://developers.myhero.so/api-reference/published/get-published-html-render-url get /published/media/html/{publishedId}/{htmlId}/render-url Returns the API-relative `path` an HTML block on the published document `publishedId` renders from, signed for one hour, and `widget`: whether a visitor (or a guest signer) may run the widget's connected data, or null for a widget without connections. Verifies the HTML belongs to that document and that the document is currently published. # Retrieve a published media file Source: https://developers.myhero.so/api-reference/published/get-published-media get /published/media/{publishedId}/{imageId} Streams the raw image bytes for `imageId` attached to the published document `publishedId`. Verifies the media belongs to that document and that the document is currently published before serving the file. # Retrieve branding for the current portal Source: https://developers.myhero.so/api-reference/published/get-published-portal-branding get /published/portal/branding Returns the `company`, `callToAction` and `socials` branding for the portal resolved from the request host. Returns `null` when no branding has been configured. Stable across page navigations on the same portal. # Retrieve published project data for the current portal Source: https://developers.myhero.so/api-reference/published/get-published-portal-data get /published/portal/project Returns the project-level aggregate data (`projectData`) for the portal resolved from the request host, plus the ancestor `FOLDER` documents of every published page (`navFolders`) and the portal's own identity (`domainSlug`, `projectDefaultSlug`) so a client can build a folder-grouped nav scoped to this portal alone. Requires the domain to be active and, if password-protected, a valid `user-published-token` header. Stable across page navigations on the same portal. # Retrieve published project branding Source: https://developers.myhero.so/api-reference/published/get-published-project-branding get /published/{publishedId}/branding Returns the `company`, `callToAction` and `socials` branding for the project that owns the given `publishedId` (or the slug-resolved portal when `publishedId` is `home`). Returns `null` when no branding has been configured. # Retrieve published project data Source: https://developers.myhero.so/api-reference/published/get-published-project-initial-data get /published/{publishedId}/project Returns the project-level aggregate data (`projectData`) for the portal that owns the given `publishedId`. Requires the domain to be active and, if password-protected, a valid `user-published-token` header. # Retrieve a published tooltip Source: https://developers.myhero.so/api-reference/published/get-published-tooltip get /published/{tooltipId}/tooltip Returns the title and ProseMirror content for a term-definition or clause-reference block identified by `tooltipId`. Pass `includeParentSection` to include the surrounding section for clause references. Returns `null` when the block type is unrecognized. # Check if a slug is available on a published domain Source: https://developers.myhero.so/api-reference/published/get-slug-availability get /published/slug-availability Returns whether the given `slug` is available for use on the given `domainSlug`. Used by the publish-settings UI for live validation. # Publish or unpublish documents Source: https://developers.myhero.so/api-reference/published/publish-documents post /published/publish Back-compatible wrapper around `POST /published/publish-state` (`target: "document", state: isPublished ? "on" : "off"`). `isPublished: true` publishes; `isPublished: false` writes a persistent explicit `publishState: "off"` on each document, so a caller that unpublishes on a schedule accumulates permanent exclusions rather than merely relaxing to "inherit". A folder id cascades to its whole subtree, taking every descendant live or dark with it. Returns the updated publish settings. The caller must have edit permission on all supplied documents. # Publish or unpublish a page, folder, or project Source: https://developers.myhero.so/api-reference/published/set-publish-state post /published/publish-state Sets the explicit publish state on the supplied targets and re-materialises `isPublished` across the project. Descendants inherit the state unless they carry an explicit one of their own. The caller must have edit permission on all supplied targets. # Stream live changes for a published page's widgets Source: https://developers.myhero.so/api-reference/published/stream-published-widget-events get /published/widget-events/{publishedId} A `text/event-stream` for the published document `publishedId`: `ready` once open, `table` with `{ tableIds }` when a table a switched-on widget reads changes (at most every two seconds), and `access` when a widget's switches or the page change. Events carry ids only; widgets re-read through the widget routes. Closes after 15 minutes; reconnect. A guest signer is refused. # Update published branding Source: https://developers.myhero.so/api-reference/published/update-published-branding put /published/{projectId}/branding Updates the company info, call-to-action and social links stored on a project's published portal. Requires the caller to be the project owner or have workspace edit permission. # Update published document settings Source: https://developers.myhero.so/api-reference/published/update-published-doc-settings put /published/{publishedId}/settings Persists per-document published settings — custom styling key/value pairs and the `domainSlug` — for the document identified by `publishedId`. Requires edit access to the document. # Update a published domain Source: https://developers.myhero.so/api-reference/published/update-published-domain put /published/domain/{slug} Updates the slug, password, disabled state, or homepage document for the domain identified by `slug`. When `newSlug` is provided, all documents whose `domainSlug` matches the old value are updated as well. # List referenced rows for a document Source: https://developers.myhero.so/api-reference/references/get-referenced-rows-by-document-id get /referenced-rows-in-document/{documentId} Returns all `ReferencedRowInDocument` records associated with the specified `documentId`. Requires read access to the document. # Retrieve referenced rows by IDs Source: https://developers.myhero.so/api-reference/references/get-referenced-rows-in-document-by-ids post /referenced-rows-in-document/get-ids Bulk-fetches `ReferencedRowInDocument` records for the IDs supplied in `data`. Verifies read access to every document referenced by the returned records. # Update a referenced row ID Source: https://developers.myhero.so/api-reference/references/update-referenced-row-in-document put /referenced-rows-in-document/updateRowId Updates the `rowId` on an existing `ReferencedRowInDocument` record identified by the `tableId` + `documentId` + `workspaceId` combination. Requires edit access to the document. Returns the MongoDB update result, or `null` if the record was not found. # Upsert a referenced row Source: https://developers.myhero.so/api-reference/references/upsert-referenced-row-in-document post /referenced-rows-in-document Creates or updates a record linking a table row to a document. The combination of `tableId` and `documentId` is used as the upsert key; `rowId` is optional. Requires edit access to the document. Returns the upserted `ReferencedRowInDocument` record. # Agree to sign electronically Source: https://developers.myhero.so/api-reference/signatures/consent-signature-guest post /signature/guest/requests/{requestId}/consent Public, with a signature-guest-token. Records the recipient's consent to use electronic records and signatures, which stands for every document the project sends them until withdrawn. # Send several documents for signature at once Source: https://developers.myhero.so/api-reference/signatures/create-signature-batch post /signature/batches Any number of documents, each its own request, grouped as one folder in each signer's portal. Each recipient gets one email and one link for all of theirs, and the signing order runs across the batch: a later recipient is emailed once everyone before them has signed every document. If any document can't be sent, none is. # Send a document for signature Source: https://developers.myhero.so/api-reference/signatures/create-signature-request post /signature/{documentId}/requests Sends the document to people outside the workspace to sign from an emailed link, without an account. Each recipient is given the signature blocks only they may sign. The document is copied as it stands and made read-only until the request completes or closes; recipients see that copy, never the live document. `fields` hands empty variables (keys from the fields route) to recipients to fill in; their values are written into the table once everyone has signed. Requires edit access. # Decline to sign Source: https://developers.myhero.so/api-reference/signatures/decline-signature-guest post /signature/guest/requests/{requestId}/decline Public, with a signature-guest-token. Declines, which ends the request for everyone: signatures given through it are cleared and the sender is told, with the reason. # Download a signed document's audit trail Source: https://developers.myhero.so/api-reference/signatures/download-signature-audit-trail get /signature/{documentId}/audit-trail Generates, on each call, a PDF of the fully signed document followed by its audit trail: every live signature with the signer, how their identity was checked, IP address, device, time and hashes, plus the history of any signature request it went through. A document signed wholly through one completed request gets the same PDF its recipients were emailed. Rejected with 409 until the document is fully signed. Requires read access to the document. # End the signer's sessions Source: https://developers.myhero.so/api-reference/signatures/end-signature-guest-session post /signature/guest/portal/end-session Public, with a signature-guest-token. Ends every session the signer has open for the project, on every device. Their emailed links still open new ones. # Fill in a field Source: https://developers.myhero.so/api-reference/signatures/fill-signature-guest-field put /signature/guest/requests/{requestId}/fields/{fieldId} Public, with a signature-guest-token. Saves the recipient's value for one of their fields, checked as its column checks values. An empty value clears it. Kept on the request until everyone has signed. # Retrieve signature audit trail Source: https://developers.myhero.so/api-reference/signatures/get-document-signature-audit get /signature/{documentId}/audit Returns every signature audit record for a document, oldest first, including those superseded by a later version. Each record carries the signer's identity, the IP address and user agent captured at signing, the server-clock timestamp, and the content hashes used to verify the document has not changed since. Records that hashed the document's variable values also report `valuesChanged`: whether those values, as resolved now, differ from when it was signed — and `valuesCompletedLater` when the only difference is details other recipients of the same signature request filled in afterwards. Records are never removed. Requires read access to the document. # A project's signature requests, signers and portal Source: https://developers.myhero.so/api-reference/signatures/get-project-signatures get /signature/projects/{projectId}/overview Every signature request the project has sent, newest first; the people they went to, with whether each has agreed to sign electronically and when they were last seen; and the signing portal's settings. # What a signing link opens to Source: https://developers.myhero.so/api-reference/signatures/get-signature-guest-link get /signature/guest/{token} Public. Where an emailed link stands before it is opened: its project, whether the portal is on and the request's status — or, for a link a resend replaced, the masked address a new one can go to. Only reads. # A signer's documents in a project Source: https://developers.myhero.so/api-reference/signatures/get-signature-guest-portal get /signature/guest/portal Public, with a signature-guest-token. Every request the project sent the signer's email address, newest first, with where each stands for them; closed ones included. # A file or clause the document links to Source: https://developers.myhero.so/api-reference/signatures/get-signature-guest-reference get /signature/guest/requests/{requestId}/reference/{id} Public, with a signature-guest-token. The content of a document, PDF or another document's clause that the copy links to, read with the sender's access; only what the copy linked to when sent, and only while the sender can still open it. # The document a recipient signs Source: https://developers.myhero.so/api-reference/signatures/get-signature-guest-request get /signature/guest/requests/{requestId} Public, with a signature-guest-token. One of the portal's documents as it was sent, without its comments; the values its variables showed then; the table data its embedded views, forms and figures render from; and the signature blocks that are the recipient's. The first open is recorded. # What a sign-in link opens to Source: https://developers.myhero.so/api-reference/signatures/get-signature-sign-in-link get /signature/guest/sign-in/{token} Public. The project's name and the masked address a sign-in link is for. Only reads. # A project's fully signed documents Source: https://developers.myhero.so/api-reference/signatures/get-signed-documents get /signature/projects/{projectId}/signed Maps each fully signed document in the project that the caller can read to when it was executed. # Empty variables recipients could fill in Source: https://developers.myhero.so/api-reference/signatures/list-signature-request-fields get /signature/{documentId}/requests/fields The document's variables that are empty now and that a recipient could fill in from a form — one per cell, however many places show it. `rowId` is null when the document has no row of that table yet; sending a field like that adds one. Requires edit access. # List a document's signature requests Source: https://developers.myhero.so/api-reference/signatures/list-signature-requests get /signature/{documentId}/requests The document's signature requests, newest first: who each went to, which signature blocks are theirs, and how far each recipient has got. Link secrets and the copy sent are never returned. Requires read access to the document. # What a batch would send Source: https://developers.myhero.so/api-reference/signatures/preview-signature-batch post /signature/batches/preview For each document: its name, its unsigned signature blocks named as the editor names them, the empty variables a recipient could fill in, and why it can't be sent if it can't (out for signature already, fully signed, not a HERO document, no edit access). # Remove a recipient's access to a signed document Source: https://developers.myhero.so/api-reference/signatures/remove-signature-recipient-access post /signature/requests/{requestId}/recipients/{recipientId}/remove-access Takes a request that is no longer out — completed, declined, cancelled or expired — out of the recipient's signing portal; its link stops opening it. A request still out is cancelled instead. Requires edit access to the document. # Remove a signer from the signing portal Source: https://developers.myhero.so/api-reference/signatures/remove-signer-access post /signature/projects/{projectId}/signers/remove-access Ends every session the address has in the project's portal, remembered devices included, and takes every document no longer out out of it. Documents still out stay signable from their own emailed links. # Replace an expired sign-in link Source: https://developers.myhero.so/api-reference/signatures/renew-signature-sign-in-link post /signature/guest/sign-in/{token}/renew Public. Emails a new sign-in link to the address an expired one was for. # Email a sign-in link to a signing portal Source: https://developers.myhero.so/api-reference/signatures/request-signature-sign-in-link post /signature/guest/projects/{projectId}/sign-in-link Public. Emails a link, valid for 30 minutes, that opens every document the project sent the address. Answers the same whether or not the address has any, so it reveals nothing. # Send a recipient a new link Source: https://developers.myhero.so/api-reference/signatures/resend-signature-request post /signature/requests/{requestId}/recipients/{recipientId}/resend Emails the recipient a new link. The previous link, and any session opened from it, stops working. Requires edit access. # Email a fresh link Source: https://developers.myhero.so/api-reference/signatures/send-signature-fresh-link post /signature/guest/{token}/fresh-link Public. From any link a signer was emailed — current, or one a resend replaced — emails them a sign-in link to their portal. Refused when the project's portal is off: then only the sender can send a new link. # Sign a signature block Source: https://developers.myhero.so/api-reference/signatures/sign-document-block post /signature/{documentId}/{nodeId}/sign Signs one signature block. The server captures the caller's IP address, user agent and its own clock, hashes the document, writes an append-only audit record, and then applies the signature into the collaborative document. Callers only need read access — signing does not require edit rights. Signing is idempotent per block: a second call returns the existing record. Rejected once the document is fully signed and locked. # Sign in to a signing portal Source: https://developers.myhero.so/api-reference/signatures/sign-in-signature-guest post /signature/guest/sign-in/{token} Public. Opens a session for the whole portal from a sign-in link: an hour, or on a remembered device as many days as the project allows (7 by default). # Sign as a recipient Source: https://developers.myhero.so/api-reference/signatures/sign-signature-guest post /signature/guest/requests/{requestId}/sign/{nodeId} Public, with a signature-guest-token. Signs one of the recipient's signature blocks, recording the same evidence as an in-app signature. Refused if the document or its values changed since it was sent. # Change the signing portal's settings Source: https://developers.myhero.so/api-reference/signatures/update-signing-portal-settings put /signature/projects/{projectId}/portal Turns the portal on or off (off: each emailed link opens only its own document), sets how many days a signer's device may stay signed in (0 never), and the note added to the disclosure — changing the note asks every signer to agree again. # Open a signing session Source: https://developers.myhero.so/api-reference/signatures/verify-signature-guest post /signature/guest/{token}/verify Public. Opens the document from its emailed link — recorded as opened and verified — and returns a session token for the signature-guest-token header, valid for an hour, that opens the signer's portal for the project — or, with the portal off, only this document's envelope. # Start a new version of a signed document Source: https://developers.myhero.so/api-reference/signatures/void-document-signatures post /signature/{documentId}/void Saves the signed version to version history with its signatures and audit trail intact, then continues the live document as a new version whose signature blocks start unsigned, and unlocks it for editing. Nothing is revoked or deleted: the superseded audit records are retained and remain attached to the version that was signed. Requires edit access. # Cancel a signature request Source: https://developers.myhero.so/api-reference/signatures/void-signature-request post /signature/requests/{requestId}/void Cancels a request that is still out. Its links stop working, signatures given through it are cleared and their audit records voided, signatures made in the app are kept, and the document becomes editable again. Recipients are emailed. Requires edit access. # Withdraw consent to sign electronically Source: https://developers.myhero.so/api-reference/signatures/withdraw-signature-guest-consent post /signature/guest/portal/withdraw-consent Public, with a signature-guest-token. Ends the signer's agreement to sign the project's documents electronically. Documents they have signed stay signed; the rest ask again before they can be signed. # Add a snapshot comment Source: https://developers.myhero.so/api-reference/snapshots/add-snapshot-comment post /snapshot/{snapshotId}/comment Appends a new comment to the snapshot's `comments` array. Requires edit access to the snapshot's document. Returns `true` on success. # Create a snapshot Source: https://developers.myhero.so/api-reference/snapshots/create-snapshot post /snapshot Captures the current Y.js state of a document as a restorable snapshot. Documents are capped at 100 snapshots. Accepts an optional `name` and initial `comments`. Returns the created snapshot including its `_id` and metadata. # Delete a snapshot Source: https://developers.myhero.so/api-reference/snapshots/delete-snapshot delete /snapshot/{snapshotId} Permanently deletes the snapshot. Requires edit access to the snapshot's document. Returns `{ success: true }` on success. # Delete a snapshot comment Source: https://developers.myhero.so/api-reference/snapshots/delete-snapshot-comment delete /snapshot/{snapshotId}/comment/{commentId} Removes a comment from a snapshot. Only the comment's original author may delete it. Returns `true` on success. # Update a snapshot comment Source: https://developers.myhero.so/api-reference/snapshots/edit-snapshot-comment put /snapshot/{snapshotId}/comment/{commentId} Replaces the text of a snapshot comment. Only the comment's original author may edit it. Returns `true` on success. # Retrieve a snapshot Source: https://developers.myhero.so/api-reference/snapshots/get-snapshot-by-id get /snapshot/{snapshotId} Returns a single snapshot including the full Y.js-encoded `state` binary, suitable for rendering or restoring the document at that point in time. # List snapshots for a document Source: https://developers.myhero.so/api-reference/snapshots/get-snapshots-by-document-id get /snapshot/document/{documentId} Returns all snapshots for the given document, sorted newest-first. The binary `state` field is omitted from list results; use the single-snapshot endpoint to retrieve it. # Record that a version was restored Source: https://developers.myhero.so/api-reference/snapshots/restore-snapshot post /snapshot/{snapshotId}/restore Reports that this saved version has been rolled back to, so `document.restoreVersion` automations fire. The content itself is restored by the editor through the collaboration session — this endpoint does not write document content. Requires edit access to the snapshot's document. # Rename a snapshot Source: https://developers.myhero.so/api-reference/snapshots/update-snapshot-name put /snapshot/{snapshotId}/name Sets a new `name` for the snapshot. Requires edit access to the snapshot's document. Returns `{ success: true }` on success. # Update a snapshot Source: https://developers.myhero.so/api-reference/snapshots/update-snapshot-partial put /snapshot/{snapshotId} Updates a snapshot's `name`, `description`, or both. At least one field must be provided. Returns `{ success: true }` on success. # Subscribe to an event Source: https://developers.myhero.so/api-reference/subscriptions/create-webhook-subscription post /subscription Registers a URL to be POSTed whenever the named event happens in the workspace. Built for REST Hook integrations that create and destroy subscriptions as users enable and disable their automations. Returns the subscription id, which is what unsubscribes it, and a `secret` shown only here: every delivery carries `X-Hero-Signature: t=,v1=`, the HMAC-SHA256 of `.` under that secret. # Unsubscribe Source: https://developers.myhero.so/api-reference/subscriptions/delete-webhook-subscription delete /subscription/{id} # List your event subscriptions Source: https://developers.myhero.so/api-reference/subscriptions/list-webhook-subscriptions get /subscription # Apply a compiled formula to every row Source: https://developers.myhero.so/api-reference/tables/apply-computed-column post /table/column/{columnId}/computed/apply Persists the compiled formula on the column and computes it for every row in the table. # Compile a natural-language formula description Source: https://developers.myhero.so/api-reference/tables/compile-computed-column post /table/column/{columnId}/computed/compile Translates the column's natural-language description into a validated expression tree and previews it against the first rows of the table. Persists nothing. # Turn a described rule into relation filter conditions Source: https://developers.myhero.so/api-reference/tables/compose-column-filter post /table/column/{columnId}/filter/compose Translates a plain-language description of which rows a relation may point at into validated filter conditions. Nothing is saved: the conditions come back for review, and are stored by sending them to `PUT /table/column/{columnId}` as `oneMany.filter`. Returns 422 when the description does not describe a rule over the available columns. # Create a column Source: https://developers.myhero.so/api-reference/tables/create-column post /table/column Adds a new typed column to the given table and creates blank cells for every existing row. Specify `data.type` to set the column type (defaults to `string`). For `select`/`multiSelect` columns, provide `data.selectItems`. Returns the created column and the new cells. # Duplicate pasted table references Source: https://developers.myhero.so/api-reference/tables/create-pasted-table-references post /table/reference/paste Re-creates table references for a document block that was pasted into `documentId`. Accepts a map of old-to-new reference IDs and returns the newly created TableReference documents. # Create a row Source: https://developers.myhero.so/api-reference/tables/create-row post /table/row Appends a new row to the given table and creates a cell for every existing column. Pass `values` — keyed by column id — to have those cells created already carrying them; any column left out gets a blank cell (or, for the identifier column, a generated name). Returns the created row document and its new cells. # Create a table Source: https://developers.myhero.so/api-reference/tables/create-table post /table Creates a new table inside the given project. Tables are spreadsheet-like data containers with typed columns. By default, an identifier column and one string column are created along with a single empty row. Returns the created table document. # Create tables from a spreadsheet Source: https://developers.myhero.so/api-reference/tables/create-table-from-csv post /table/csv-upload Parses a CSV, TSV, or XLSX file (provided as a base64-encoded string in `csvData`) and creates one table per sheet. Column types are inferred from the data. Returns a single Table object for single-sheet uploads, or an array for multi-sheet XLSX files. # Create a table reference Source: https://developers.myhero.so/api-reference/tables/create-table-reference post /table/reference Links a table column into a document, optionally binding it to a specific row. A reference can be a `relation` (one-to-one row link) or a `reference` (one-to-many). Returns the created TableReference document. # Delete a column Source: https://developers.myhero.so/api-reference/tables/delete-column delete /table/column/{columnId} Permanently deletes a column and all its cells. Returns a MongoDB deletion result. # Delete a row Source: https://developers.myhero.so/api-reference/tables/delete-row delete /table/row/{rowId} Permanently deletes a row and all its cells. Returns a MongoDB deletion result. # Delete a table Source: https://developers.myhero.so/api-reference/tables/delete-table delete /table/{tableId} Permanently deletes the table and all its associated rows, columns, and cells. Returns a MongoDB deletion result. # List tables in a project Source: https://developers.myhero.so/api-reference/tables/get-all-tables-by-project-id get /table/project/{projectId} Returns all table documents the authenticated user can access within the given project. Results are filtered by the user's workspace or document-level permissions. # List table IDs in a project Source: https://developers.myhero.so/api-reference/tables/get-all-tables-ids-by-project-id get /table/all/{projectId}/id Returns the `_id` of every table in the given project, ordered newest-first. Useful for checking which tables exist without fetching full documents. # Retrieve multiple cells Source: https://developers.myhero.so/api-reference/tables/get-cells-by-ids post /table/get-cells Accepts an array of cell IDs and returns the subset the caller can access. Cells the caller cannot access are silently omitted. # Retrieve multiple columns Source: https://developers.myhero.so/api-reference/tables/get-columns-by-ids post /table/get-columns Accepts an array of column IDs and returns the subset belonging to tables the caller can access. Columns from inaccessible tables are silently omitted. # List who can reach a row Source: https://developers.myhero.so/api-reference/tables/get-row-access get /table/row/{rowId}/access Returns everyone who can currently reach the row, and the document-level viewers in the project who cannot. Requires permission to manage the row's access. # List who can reach a set of rows Source: https://developers.myhero.so/api-reference/tables/get-row-access-many post /table/rows/access Returns everyone who can reach at least one of the rows, and the document-level viewers in the project who can reach none. Each entry reports how many of the rows it covers. Rows must belong to one project, and the caller must be able to manage access on all of them. # List who reaches each of a set of rows Source: https://developers.myhero.so/api-reference/tables/get-row-access-summary post /table/rows/access/summary Returns, per row, the ids of everyone who can reach it, plus each of those people once with their display name. Same access rules as the full audience, answered row by row rather than folded across the set. # List cells in a row Source: https://developers.myhero.so/api-reference/tables/get-row-cells get /table/cells/{tableId}/{rowId} Returns all cells belonging to a specific row. Returns 404 if the row does not exist or the caller lacks access. # Retrieve row permissions Source: https://developers.myhero.so/api-reference/tables/get-row-permissions get /table/row/{rowId}/permissions Returns the caller's highest effective role for the given row and a `canEdit` flag indicating whether the user may write to cells in that row. # Retrieve permissions for many rows Source: https://developers.myhero.so/api-reference/tables/get-row-permissions-batch post /table/rows/permissions Returns a map of rowId to the caller's effective permissions for that row. Prefer this over calling the single-row endpoint per row when rendering a table. # Retrieve multiple rows Source: https://developers.myhero.so/api-reference/tables/get-rows-by-ids post /table/get-rows Accepts an array of row IDs and returns the subset the caller can access. Rows the caller cannot access are silently omitted. # Retrieve a table Source: https://developers.myhero.so/api-reference/tables/get-table-by-id get /table/{tableId} Returns a single table document. Returns 404 if the table does not exist or the caller lacks access. # Retrieve a cell Source: https://developers.myhero.so/api-reference/tables/get-table-cell get /table/cell/{cellId} Returns a single cell document including its typed `data` value. Returns 404 if the cell does not exist or the caller lacks access. # List cells in a table Source: https://developers.myhero.so/api-reference/tables/get-table-cells get /table/cells/{tableId} Returns all cells for the given table that the caller can access. Like rows, cell visibility is filtered by workspace or document-level access. # Retrieve a column Source: https://developers.myhero.so/api-reference/tables/get-table-column get /table/column/{columnId} Returns a single column document including its data type and type-specific options. Returns 404 if the column does not exist or the caller lacks access to its parent table. # List columns in a table Source: https://developers.myhero.so/api-reference/tables/get-table-columns get /table/columns/{tableId} Returns all column documents for the given table, including their types and type-specific options. # List the people a table's person column can name Source: https://developers.myhero.so/api-reference/tables/get-table-people get /table/{tableId}/people Returns the workspace's owner, admins and members, then everyone collaborating on a document in the table's project, each with their role — workspace members first, then by name. The caller must be able to write the table's rows. # Retrieve table permissions Source: https://developers.myhero.so/api-reference/tables/get-table-permissions get /table/{tableId}/permissions Returns the caller's highest effective role (`owner`, `admin`, `member`, `editor`, or `viewer`) for the given table, together with whether access is granted via workspace membership and the list of referencing document IDs. # Retrieve a table reference Source: https://developers.myhero.so/api-reference/tables/get-table-reference-by-id get /table/reference/{referenceId} Returns a single table reference document. Access requires read permission on the document the reference belongs to. # List table references in a document Source: https://developers.myhero.so/api-reference/tables/get-table-references-by-document-id get /table/references/{documentId} Returns all table references embedded in the given document. Requires edit access to the document. # Retrieve multiple table references Source: https://developers.myhero.so/api-reference/tables/get-table-references-by-ids post /table/get-references-ids Accepts an array of table reference IDs and returns matching documents. Requires access to all of the referenced documents. # Retrieve a row Source: https://developers.myhero.so/api-reference/tables/get-table-row get /table/row/{rowId} Returns a single row document. Returns 404 if the row does not exist or the caller lacks access. # List rows in a table Source: https://developers.myhero.so/api-reference/tables/get-table-rows get /table/rows/{tableId} Returns rows the caller can access within the given table. Workspace members receive all rows; document collaborators receive only rows referenced in their accessible documents. Pass `sort` and `limit` for newest-first paging. # Retrieve multiple tables Source: https://developers.myhero.so/api-reference/tables/get-tables-by-ids post /table/get-tables Accepts an array of table IDs and returns the subset the caller can access. Tables without permission are silently omitted. # Retrieve a window of a table's cells Source: https://developers.myhero.so/api-reference/tables/get-windowed-cells post /table/cells/{tableId}/window Returns the cells for the given rows, plus the cells that can name a row anywhere in the table — identifier cells and one-to-many relation cells. Those always travel, because the relation and link inputs resolve a row's label from them regardless of which page that row is on. Intended for grids that load a page at a time; omit it and `GET /table/cells/{tableId}` still returns everything. # Grant a user access to a row Source: https://developers.myhero.so/api-reference/tables/grant-row-access put /table/row/{rowId}/access Grants a document-level user an editor or viewer role on a single row, independent of whether any document references it. Re-granting updates the role. # Grant a user access to a set of rows Source: https://developers.myhero.so/api-reference/tables/grant-row-access-many put /table/rows/access Grants a document-level user the same editor or viewer role on every row given, independent of whether any document references them. Re-granting updates the role. # Preview the tables a spreadsheet would create Source: https://developers.myhero.so/api-reference/tables/preview-table-from-csv post /table/csv-preview Parses a CSV, TSV, or XLSX file and reports, per sheet, the column headers, the type inferred for each column, and the first few rows — without creating anything. Pass the result's types back to `POST /table/csv-upload` as `columnTypes` to import with any of them changed. # Revoke a user's row access Source: https://developers.myhero.so/api-reference/tables/revoke-row-access delete /table/row/{rowId}/access/{userId} Removes a direct row grant. Access the user has through documents or workspace membership is unaffected. # Revoke a user's access to a set of rows Source: https://developers.myhero.so/api-reference/tables/revoke-row-access-many delete /table/rows/access Removes the user's direct grant from every row given. Access they hold through documents or workspace membership is unaffected. # Update a cell Source: https://developers.myhero.so/api-reference/tables/update-cell put /table/cell/{cellId} Updates the `value` of a single cell. The accepted shape of `value` depends on the cell's column type. For identifier cells, updating the value also propagates the change to linked cells across the table. Returns the updated cell. # Update a column Source: https://developers.myhero.so/api-reference/tables/update-column put /table/column/{columnId} Updates a column's `name`, `description`, data `type`, or type-specific options (`number`, `oneMany`, `selectItems`). When renaming, all table references that display this column's name are updated automatically. Returns 409 on a duplicate name within the same table. A type change that would leave values unreadable is refused with 409 `COLUMN_CONVERSION_DESTRUCTIVE` and a count of what would be resolved and what cleared; send `confirm: true` to proceed. `string` -> `oneMany` first tries to resolve each value against the linked table's identifier column, so text that already names rows becomes links rather than blanks. A successful type change reports `valuesResolved` and `valuesCleared`. # Update a table Source: https://developers.myhero.so/api-reference/tables/update-table put /table/{tableId} Updates a table's `name`, `description`, `columns` order array, or `icon`. Returns 409 if the new name conflicts with an existing table in the same project. Returns the updated table. # Update a table reference Source: https://developers.myhero.so/api-reference/tables/update-table-reference put /table/reference/{referenceId} Updates the `oneToManyColumnId` and/or `oneToManyInstanceIds` of a table reference. Requires edit access to the document the reference belongs to. Returns the updated TableReference. # Copy document templates to a project Source: https://developers.myhero.so/api-reference/templates/copy-template-documents-to-user post /templates/copy/documents Copies up to 10 document templates into a user's project, refreshing all internal IDs in the process. A `projectId` or `workspaceId` must be supplied; when only `workspaceId` is given a new project named "Template Project" is created automatically. Returns the target `projectId`, `workspaceId`, and the `firstNewDocumentId` for navigation. # Copy project templates to a workspace Source: https://developers.myhero.so/api-reference/templates/copy-template-projects-to-user post /templates/copy/projects Copies one or more project templates into the specified workspace, creating new projects for each. Requires create-project permission on the `workspaceId`. Returns the `firstNewProjectId` for navigation. # Import SEC EDGAR filings as templates Source: https://developers.myhero.so/api-reference/templates/create-sec-gov-documents post /templates/parser/secgov Fetches and parses SEC EDGAR `.htm` filing URLs, converts them to Scribe document format, and stores them as document templates. Restricted to manager-role users. Each URL must be on the `sec.gov` domain and end in `.htm`. # List all templates Source: https://developers.myhero.so/api-reference/templates/get-all-templates get /templates Returns all available project templates and document templates in a single response. Document templates include metadata only — the template data payload is excluded from this listing. # List document templates Source: https://developers.myhero.so/api-reference/templates/get-document-templates get /templates/documents Returns all available document templates. Each entry contains metadata (name, publisher, category, description) only — the template content payload is excluded. # List project templates Source: https://developers.myhero.so/api-reference/templates/get-project-templates get /templates/projects Returns all available project templates including their name, icon, emoji, and metadata. # Retrieve clause tooltip Source: https://developers.myhero.so/api-reference/tooltips/get-tooltip-clause-reference get /tooltip/clause-reference/{clauseReferenceId} Returns the tooltip content for a clause reference, including the referenced block's `title`, ProseMirror `content` nodes, and `blockId`. When `includeParentSection` is set, the response may include the parent section's heading as the title. Requires read access to the source document. # Retrieve term tooltip Source: https://developers.myhero.so/api-reference/tooltips/get-tooltip-term get /tooltip/term/{termId} Returns the tooltip content for a term definition identified by `termId`, including a `title` and ProseMirror `content` array. Requires read access to the document that owns the term. # List TTS voices and styles Source: https://developers.myhero.so/api-reference/tts/get-tts-voices get /tts/voices Returns the available text-to-speech voices (`key`, display `name`, `gender`), the style presets (`key`, `label`), the defaults, and `maxChunkBytes`, the largest text accepted per synthesis request. # Synthesize conversational speech (deprecated) Source: https://developers.myhero.so/api-reference/tts/synthesize-conversational post /tts/conversational Deprecated: use `synthesizeSpeechAudio`. Returns raw `audio/mpeg` bytes for `text` (max `maxChunkBytes` bytes). `style` may be a style preset key; other values fall back to the natural style. # Synthesize speech Source: https://developers.myhero.so/api-reference/tts/synthesize-speech post /tts/synthesize Generates text-to-speech audio for the given `text` and returns it base64-encoded as `{ audioContent, audioConfig, model }`. `voice` is one of the names returned by `getTtsVoices` (case-insensitive, default `Charon`); an unknown voice is rejected. Style is set with a `style` preset or a free-form `prompt` (max 900 characters); with neither, no style prompt is used. Prefer `synthesizeSpeechAudio`, which returns raw bytes and is a third smaller on the wire. # Synthesize speech audio Source: https://developers.myhero.so/api-reference/tts/synthesize-speech-audio post /tts/speech Generates speech for one chunk of text (max 900 bytes, see getTtsVoices' maxChunkBytes) and returns raw `audio/mpeg` bytes. Long documents are read by splitting them into sentence-aligned chunks and requesting them in sequence. Identical requests from the same user are served from a server-side cache. `voice` is one of the names returned by `getTtsVoices`, `style` one of its style keys (default `natural`). # Create documents from a file tree Source: https://developers.myhero.so/api-reference/upload/create-uploaded-documents post /upload Ingests a nested file-tree map of base64-encoded file contents (`uploaded`) and creates corresponding Scribe documents in the specified workspace or project. Requires create-document permission on the target project, or create-project permission on the workspace when no `projectId` is supplied. # Validate an embed URL Source: https://developers.myhero.so/api-reference/upload/validate-embed-url post /upload/validate-embed-url Checks whether the given `url` is safe and suitable for embedding in the editor. Blocks executable and archive file extensions, follows redirects, and inspects the Content-Type and Content-Disposition headers of the remote resource. Returns `{ valid: true }` on success or `{ valid: false, message }` with the reason for rejection. # Create a user account Source: https://developers.myhero.so/api-reference/users/create-user post /user Creates a new Firebase and database user record from the provided `email` and `password`. Returns the Firebase user record. An optional `invitationId` links the account to a pending invitation. # Retrieve entity owner Source: https://developers.myhero.so/api-reference/users/get-doc-owner get /user/owner/{docId} Returns the `CollaboratorUser` who owns the document, project, or workspace identified by `docId`. Searches across all three collections and returns `null` when the entity is not found. # Retrieve own user profile Source: https://developers.myhero.so/api-reference/users/get-self-user-info get /user/self-info Returns the full user document for the authenticated caller, including profile fields and editor settings such as font size, theme, tree ordering, and signature preferences. # List collaborators Source: https://developers.myhero.so/api-reference/users/get-user-collaborators get /user/collaborators Returns all users who share at least one organization or workspace with the authenticated user. Each collaborator is returned as a public-safe `CollaboratorUser` (Firebase UID + profile only). # Retrieve collaborators by IDs or emails Source: https://developers.myhero.so/api-reference/users/get-user-collaborators-by-ids get /user/collaborators/ids Looks up users by comma-separated `userIds` and/or `emails` query params and returns the matching `CollaboratorUser` records. Useful for resolving mention targets. # Complete user onboarding Source: https://developers.myhero.so/api-reference/users/setup-user-default-data post /user/setup/default Finalizes account setup for a newly registered user: creates a default organization and workspace, provisions a Stripe customer and billing seat, applies any early-bird coupon, and optionally seeds template projects and sends invitation emails. Returns a `redirect` URL pointing to `/home`, `/plans`, or an invite-accept page. # Update user profile Source: https://developers.myhero.so/api-reference/users/update-user-info post /user/info Updates one or more profile fields (`firstName`, `lastName`, `pictureUrl`, `avatarId`) for the authenticated user. Returns `true` on success. # Update user settings Source: https://developers.myhero.so/api-reference/users/update-user-settings post /user/settings Persists editor and display preferences — font size, theme, tree ordering, selected signature, or custom signature — for the authenticated user. At least one field must be present in the request body. # Update a collaborator's workspace role Source: https://developers.myhero.so/api-reference/workspaces/change-workspace-user-role put /workspace/{workspaceId}/change-role Changes the role of a workspace collaborator identified by `userId`. Broadcasts a real-time role update event to connected clients on success. # Create a workspace Source: https://developers.myhero.so/api-reference/workspaces/create-workspace post /workspace Creates a new workspace under the authenticated user's default organization. Subject to the organization's plan limit on workspace count. Returns the created workspace on success. # Delete a workspace Source: https://developers.myhero.so/api-reference/workspaces/delete-workspace delete /workspace/{workspaceId} Soft-deletes the workspace and all of its projects. Only the workspace owner may perform this action. Returns `true` on success. # List workspaces Source: https://developers.myhero.so/api-reference/workspaces/get-all-user-workspaces get /workspace/all Returns all workspaces the authenticated user is a member of, across all organizations. # List workspaces in an organization Source: https://developers.myhero.so/api-reference/workspaces/get-all-user-workspaces-by-org-id get /workspace/all/{orgId} Returns all workspaces the authenticated user belongs to within the specified `orgId`. # Retrieve the default workspace Source: https://developers.myhero.so/api-reference/workspaces/get-default-workspace get /workspace/default Returns the default workspace for the authenticated user's default organization. Returns 400 if no default organization or workspace is found. # Retrieve a workspace Source: https://developers.myhero.so/api-reference/workspaces/get-workspace-by-id get /workspace/{workspaceId} Retrieves a single workspace by `workspaceId`. Returns 403 if the caller is not a member, and 404 if the workspace does not exist. # Retrieve workspace dashboard info Source: https://developers.myhero.so/api-reference/workspaces/get-workspace-dashboard-info get /workspace/{workspaceId}/dashboard-info Returns aggregated information for the workspace dashboard, including the workspace record and member profiles. Owners and admins also receive the list of pending invitations. # Invite a user to a workspace Source: https://developers.myhero.so/api-reference/workspaces/invite-user-to-workspace post /workspace/invite-user Sends a workspace invitation to the given `email` address at the specified `role`. Creates an invitation link and sends an email; if the user is not yet registered, a signup link is included. Returns the created invitation or `null`. # Leave a workspace Source: https://developers.myhero.so/api-reference/workspaces/remove-self-from-workspace post /workspace/{workspaceId}/leave Removes the authenticated user from the workspace. Workspace owners cannot leave; they must transfer ownership first. # Remove a user from a workspace Source: https://developers.myhero.so/api-reference/workspaces/remove-user-from-workspace post /workspace/remove-user Removes a collaborator from the workspace. Requires workspace edit permission. Broadcasts a removal event to connected clients. Returns `true` on success. # Update a workspace Source: https://developers.myhero.so/api-reference/workspaces/update-workspace put /workspace/{workspaceId} Updates the `name` and/or `description` of a workspace. Requires workspace edit permission. Returns `true` on success. # Authentication Source: https://developers.myhero.so/authentication Authenticate to the HERO REST API and MCP server with Bearer API keys. Generate, scope, and revoke keys from your account settings. The HERO REST API authenticates with **API keys** issued from your account settings. \ Pass the key on every request as: ```http theme={null} Authorization: Bearer hero_ak_<...> ``` ## Generating an API key 1. Sign in at [HERO](https://app.myhero.so). 2. Open **[Settings](https://app.myhero.so/#/settings/account "https://app.myhero.so/#/settings/account")** and click **Generate new API key**. 3. Choose a name, workspace scope (all of your workspaces, or specific ones), and an expiry. Copy the key — it's shown once. 4. Use it in any `Authorization: Bearer ` header. API keys inherit your user permissions within the workspaces they're **scoped** to. \ Revoking a key from the same settings page invalidates it **immediately**. ## Using the same key for MCP Your `hero_ak_*` API key also authenticates MCP clients (Cursor, VS Code, Claude Desktop, Claude Code) — see [MCP authentication](./mcp/authentication) for client-config snippets and the OAuth alternative. Tokens issued from the MCP settings page (`hero_at_*` prefix) work the same way; the two settings pages are just convenience for the two surfaces. # How automations fire Source: https://developers.myhero.so/automation-events Every trigger, event, condition and token a HERO automation can use — what starts a run, what it is told when it does, and every way it can silently not fire. How a HERO automation gets started, what it is told when it does, and every way it can silently not fire. An automation is three parts: ``` trigger(s) → condition (optional) → actions (in order) what starts it whether it proceeds what it does ``` Any trigger can start it. The condition is checked once, before the first action. The actions then run in order, each able to read the ones before it — except where a `control.paths` step branches, and a `control.wait` step suspends the run and resumes it later with the earlier steps' outputs restored. *** ## 1. Triggers **Four types are offered.** An automation can carry several, of mixed types. | Type | Starts when | Supplies | | - | - | - | | `event` | Something changes in the database | event, row, document, clause, actor, previous, version, member, table, column, project | | `schedule` | A cron expression or a one-off time | — | | `manual` | Someone presses Run | actor | | `connector` | New mail arrives in a connected Gmail/Outlook | payload | "Supplies" is the set of **slots** that trigger can fill — see §6. A token addressing a slot its trigger cannot fill is refused at save rather than resolving to nothing at run time (`automationReference.service.ts`, `SLOTS_BY_TRIGGER`). **Shapes** ```jsonc theme={null} { "type": "event", "event": "row.created", "filter": { "tableId": "…" } } { "type": "event", "event": "clause.added", "projectId": "…", "filter": { "documentIds": ["…"] } } { "type": "schedule", "mode": "recurring", "cron": "0 9 * * 1", "timezone": "UTC" } { "type": "schedule", "mode": "once", "runAt": 1754524800000 } { "type": "manual" } { "type": "connector", "provider": "gmail", "event": "mail.received", "query": "from:legal@" } ``` ### Three trigger types are superseded `button`, `webhook` and `api` remain in the type so a saved automation still round-trips, but **none of them is offered or read any more**. None is a thing that happens to your data — each is a way of *asking* for a run, which is what made them read like one more "when" while actually being consent, or in the webhook's case nothing at all. The two entry points they stood for still exist, as properties of the automation rather than as triggers: * `POST /api/automation/hook/{publicId}` — authenticated by the automation's own webhook secret, because the caller is outside HERO and has no session. Enabled by generating a secret (`automation.webhook`), not by adding a trigger. * The API entry point — authenticated by the caller's personal token, so the run records who asked while still executing as the automation's owner. Both accept an `Idempotency-Key`; a repeat of a key that already ran returns the original run with `replayed: true` rather than running the workflow twice. **Limits** * Schedules run **no more often than every 5 minutes**, and two schedules on the same automation must be ≥5 minutes apart (`MIN_INTERVAL_MS`). * Connectors are **polled**, not pushed, at the same 5-minute floor, **10 messages per poll** (`MIN_POLL_INTERVAL_MS`, `MAX_MESSAGES_PER_POLL`). * A webhook body must be JSON — an **object or an array** (many services batch) — and is capped at **1 MB** (`MAX_PAYLOAD_BYTES`); an oversized body is refused before the queue. The secret is sent as `X-Hero-Webhook-Secret` or `Authorization: Bearer …`, compared in constant time, and only its hash is stored — the plaintext is shown once, at creation or rotation. *** ### Subscriptions are signed `POST /api/subscription` returns a `secret` **once**; listing subscriptions never returns it again. Every delivery to that subscription carries ``` X-Hero-Signature: t=,v1= ``` where `v1` is the HMAC-SHA256 of `` `${t}.${rawBody}` `` under that secret. Verify against the **raw** body before parsing it, compare in constant time, and reject a `t` that is far from now — the timestamp is inside the signature precisely so a captured body cannot be replayed. ```js theme={null} const [t, v1] = header.split(",").map((part) => part.split("=")[1]); const expected = crypto.createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex"); const ok = crypto.timingSafeEqual(Buffer.from(v1), Buffer.from(expected)); ``` Unlike the inbound automation hook secret — hashed at rest, because HERO only ever compares it — this one is stored in plaintext: signing needs the key back. Rotate by deleting the subscription and creating it again. ## 2. Events Thirty-two exist in the type. **Thirty are offered**; `row.enteredView` and `row.leftView` are in the schema but the bridge never emits them, so they are refused at save with a reason rather than accepted and left dead. The list lives once, in `packages/script-shared/src/types/Automation.ts` as `AUTOMATION_EVENTS`. The save schema, the trigger picker and the AI composer's prompt are all derived from it. Alongside it, `EVENT_SOURCES` declares **how each event reaches the bridge** — `stream`, `emitted`, or `none`. Declaring it is the point: the recurring failure in this feature is an event that exists in the type, is offered in the picker, saves without complaint and is emitted by nothing at all. `none` is confined to the two unimplemented events. ### Rows and cells | Event | Fires when | | - | - | | `row.created` | A row document is inserted | | `row.updated` | A row is updated and `isDeleted` was **not** among the changed fields | | `row.deleted` | A row's `isDeleted` changes (the soft delete) | | `cell.changed` | A row's values change — once per write to the row, naming every column it touched | Changes made to a whole column at once do **not** fire `cell.changed`: changing a column's type, renaming or removing a select option, and clearing formulas that read a deleted column. Each rewrites every row of the column; firing per row would run an automation 30,000 times for one edit on a table that size. A column that stops holding a value is reported by `column.deleted`, and adding a column changes no row, so it fires `column.added` alone. ### Clauses and terms These ride the block projection the editor already writes on every save — no separate scan. Only blocks of type `CLAUSE_BLOCK` and `TERM_DEFINITION` are considered; everything else is ignored. | Event | Fires when | | - | - | | `clause.added` | A clause block is inserted | | `clause.edited` | A clause block is updated, `isDeleted` untouched | | `clause.deleted` | A clause block's `isDeleted` changes | | `term.defined` | A term block is inserted **or** edited | | `term.removed` | A term block's `isDeleted` changes | `term.defined` covering both insert and edit is deliberate: a definition being written and being rewritten are the same event to anyone watching for it. ### Signatures Driven by the `DocumentSignatures` projection, which the collaboration server rewrites on **every** persist of a document containing a signature block. So "the projection changed" only means someone typed — each branch has to name a real state change. | Event | Fires when | | - | - | | `signature.signed` | A signature line gains a `signedAt` it did not have | | `document.fullySigned` | `completedAt` goes from unset to set | | `document.signaturesVoided` | `completedAt` goes from set to unset | `completedAt` is derived, not stored intent: it is the latest `signedAt` when there is at least one signature line and **every** line is signed, and unset otherwise (`completionOf`). That makes `document.signaturesVoided` **"the document is no longer fully signed"**, which is what the trigger picker calls it. Voiding is the usual cause and the only one reachable while the document is locked, but deleting the last signature blocks from an unlocked document reaches it too. The event key is unchanged for saved automations; only the label is honest. `signature.signed` compares the before and after projections, so a block being added or renamed is not mistaken for a signing. That comparison needs change-stream **pre-images**, which are enabled on `DocumentSignatures` only (§8). ### Documents | Event | Fires when | | - | - | | `document.created` | A document is inserted with no `originId` | | `document.duplicated` | A document is inserted **with** an `originId` | | `document.deleted` | `isDeleted` changes | | `document.moved` | `parentId` changes | | `document.published` | `isPublished` changes — **either direction**, including unpublishing | | `document.renamed` | `name` changes | | `document.updated` | Any other update | Checked in that order, first match wins. `document.updated` is the fallback, so a move, a publish or a rename does **not** also fire it. `document.renamed` sits before the fallback for the same reason `document.moved` does: renaming is a deliberate act, and folding it into "updated" makes it untriggerable. ### Workspace and access | Event | Fires when | | - | - | | `workspace.memberJoined` | Someone accepted an invitation to the workspace | | `workspace.memberLeft` | Someone lost their place in it | | `document.collaboratorAdded` | Someone was given access to one document | | `document.collaboratorRemoved` | That access was taken away | All four are **emitted**, not derived: they are reported by the invitation, workspace and document services, which know who acted. They fill the `member` slot. ### Structure The shape of the data changing, rather than the data in it. | Event | Fires when | | - | - | | `table.created` | A table document is inserted | | `table.deleted` | A table's `isDeleted` changes | | `column.added` | A column is inserted | | `column.deleted` | A column's `isDeleted` changes | | `project.created` | A project is inserted | Creating a table creates its columns, so a new table reports itself and then each column — the same way it reports each row. Truthful rather than tidy. `project.created` is **creation only**: a project has no `isDeleted`, so there is no soft delete to read, and a hard removal cannot be told apart from the cron tidying up after one. ### Versions | Event | Fires when | | - | - | | `document.newVersion` | A saved version is written | | `document.restoreVersion` | An earlier version is rolled back to | Both carry **who did it** (`actorId`) and **which version** (`versionId`, `versionName`) — the only events besides the void that name an actor. `document.newVersion` covers every route that produces a version a person can see in the history: the editor's *Save version*, the AI's `create_document_snapshot`, and the `Signed — ` version a completed signing preserves. It does **not** fire for the AI's own pre-edit undo checkpoints (`isAiManaged`), which are hidden from the history — firing on those would announce a version for every AI edit, and an automation that edits a document could then trigger itself through its own checkpoint. These two are the only events **not** derived from a change stream: * Versions live in `EditorYjsSnapshots`, which nothing watches — and each row holds a whole Y.js state blob, so putting it on the realtime stream to reach the bridge would push megabytes at every subscriber on every save. * A restore writes nothing on the server at all. The editor applies the old content through the collaboration session, which reaches the server as an ordinary document change, indistinguishable from a large paste. So both are emitted directly by the code that performs them, and **neither is debounced** — each is one deliberate act, not an edit burst. Causation still applies, which matters because the AI can save a version itself. > **A restore of a signed version fires no signature events.** > Restoring brings the version's signatures back with it, so the projection gains a > `signedAt` on every line and a `completedAt` — which reads exactly like people signing. > Nothing was signed; a rollback happened, and `document.restoreVersion` says so. So > `signature.signed`, `document.fullySigned` and `document.signaturesVoided` are suppressed > for that document for **30 seconds** from the moment the restore is reported, and anything > already queued for it is dropped. > > Dropping the queued run is the part that matters: the client applies the restore to the > shared document and only *then* tells the server, so the projection write normally reaches > the change stream first. It survives that because dispatch waits out the 5-second debounce, > and the report lands inside it. > > The restore also re-locks the document if the version it brought back was fully signed, and > hands the live audit slots back to the records that version refers to. > **Limit — a restore is reported by the client, not derived.** > `POST /api/snapshot/{snapshotId}/restore` is called by the editor after the content lands. > It is authenticated and checks edit access on the document, but a client that dies mid-restore > reports nothing, and the event is only as trustworthy as the session that sent it. Everything > else in this document is observed server-side. ### Deletes are soft Deleting anything sets `isDeleted: true`; the real removal happens \~48 hours later when a cron sweeps. The bridge therefore fires on the **soft delete** and ignores Mongo `delete` operations entirely. A hard delete is garbage collection, not something a person did, and firing on it would repeat the event two days after anyone cared. *** ## 3. Filters An event trigger may narrow itself: ```jsonc theme={null} { "type": "event", "event": "cell.changed", "filter": { "tableId": "…", "columnId": "…" } } { "type": "event", "event": "clause.added", "filter": { "documentIds": ["…", "…"] } } ``` Honoured keys: `tableId`, `columnId`, and **`documentIds`** — a list, read through `triggerDocumentIds`, which folds in the superseded single `documentId` so an automation saved before the picker existed keeps narrowing exactly what it did. Each is compared with `===` against the same field on the fired event's context. An absent key means "don't care", and an empty `documentIds` means every document — the filter is opt-in. A trigger may also carry **`projectId`**, outside the filter, which narrows it to one project. It was offered by the type from the beginning and read by nothing, so an automation scoped to one project fired for every project in the workspace; it is honoured now. Which events offer which picker is declared, not inferred: * **`DOCUMENT_SCOPED_EVENTS`** — the clause, term, signature and document events that fire about a document which already exists. `document.created` and `document.duplicated` are absent on purpose: the document they fire for does not exist yet, so there is nothing to pick from. * **`TABLE_SCOPED_EVENTS`** — the row, cell and column events, plus `table.deleted`. **There is no `folderId` filter.** Matching one means walking a document's parent chain, and a filter the bridge silently ignores is worse than one that does not exist: it narrows nothing while looking like it narrows something. > **Trap — a filter key the event never populates matches nothing.** > `filter.tableId` on `document.updated` means the trigger never fires: document events carry > no `tableId`, so the comparison fails every time. Filter on a key the event actually has. > **Trap — filters take bare ids, never `hero:` URIs.** > `"tableId": "hero:table/0fcb…"` is compared literally against a raw database id and matches > nothing. Saving normalises the known structural keys (`tableId`, `columnId`, `documentId`, > `rowId`, `viewId`, `blockId`) back to bare ids, so this is handled — but only for those keys. > `hero:` tokens belong in prose. Which ids each event carries: | Event group | `documentId` | `tableId` | `rowId` | `columnId` | `blockId` | | - | - | - | - | - | - | | `row.*` | — | ✓ | ✓ | — | — | | `cell.changed` | — | ✓ | ✓ | ✓ | — | | `clause.*` / `term.*` | ✓ | — | — | — | ✓ | | `signature.*` / `document.fullySigned` / `document.signaturesVoided` | ✓ | — | — | — | — | | `document.*`, including the version and collaborator events | ✓ | — | — | — | — | | `table.*` | — | ✓ | — | — | — | | `column.*` | — | ✓ | — | ✓ | — | | `project.created` | — | — | — | — | — | | `workspace.*` | — | — | — | — | — | Every event carries a `workspaceId`, and a run is **refused** without one — matching everyone is how one customer's row edit once ran another customer's automation, and a loud log beats quietly restoring that. *** ## 4. Conditions **One** condition per automation, top-level — never inside a trigger, where it would be silently dropped. It is evaluated once, before the first action; false means the run does not proceed. Individual steps and `control.paths` branches carry their own conditions, of the same three kinds. Three kinds, and they are not interchangeable. ### `fields` — for document triggers Looks up the document that fired and tests its own fields. ```jsonc theme={null} { "kind": "fields", "conjunction": "and", "predicates": [{ "field": "name", "op": "contains", "value": "Contract" }] } ``` * Fields: `name`, `parentId`, `type`, `isPublished`, `projectId`, `userId` * Operators: `is`, `is_not`, `contains`, `starts_with`, `matches_regex`, `is_empty`, `is_not_empty` * `conjunction`: `and` | `or` * No predicates is vacuously **true** * `matches_regex` is **anchored** — `Contract` does not match `Employment Contract`; use `.*Contract.*`. A malformed pattern is no-match, not a crash. * `is` / `is_not` compare booleans as booleans, everything else as text. A `false` is not empty. * **No `documentId` on the trigger context → false.** Used on a row trigger, it matches nothing. ### `rowFilter` — for row and cell triggers The same engine that powers saved table views, so a condition and a view can never disagree. ```jsonc theme={null} { "kind": "rowFilter", "group": { "conjunction": "and", "filters": [ { "id": "c1", "columnId": "", "op": "is_not_empty", "value": "" } ]}} ``` Operators depend on the column's effective type (a computed column uses its formula's result type): | Column type | Operators | | - | - | | Text-like (string, email, url, phone, identifier, image, link, location) | `contains`, `not_contains`, `is`, `is_not`, `is_empty`, `is_not_empty` | | Number, money | `eq`, `neq`, `gt`, `gte`, `lt`, `lte`, `is_empty`, `is_not_empty` | | Date, time | `is`, `is_not`, `before`, `after`, `on_or_before`, `on_or_after`, `is_empty`, `is_not_empty` | | Select, multi-select | `is`, `is_not`, `is_empty`, `is_not_empty` (case-insensitive, any-of) | | Checkbox | `is_checked`, `is_unchecked` | | Button | none — always passes; the cell holds run state, not a value | * **No `tableId` + `rowId` on the trigger context → false.** Used on a document trigger, it matches nothing. * Text comparisons are case-insensitive. > **Trap — a relation column never matches inside an automation.** > Relation cells store linked cell ids, not text, so the engine needs a label resolver to > compare them. Both view layers pass one; **neither automation path does**, and unresolvable > is treated as excluded (deliberately — the alternative made every negated operator match > every row). So a condition on a relation column evaluates false and the automation never > runs, and a `table.updateRows` filtered on one matches no rows and silently edits nothing. > Filter on a scalar column instead. ### `value` — compares any two resolved values ```jsonc theme={null} { "kind": "value", "conjunction": "and", "predicates": [ { "left": "@[Summary](hero:step/a1.summary)", "op": "contains", "right": "overdue" } ]} ``` Both sides are prose and both go through the same token resolution as an email body. That is what it is for: it is the only condition kind that can test **something a step produced during the run**, because the other two start by loading the row or document that fired and so can only ever see the trigger. Operators: `is`, `is_not`, `contains`, `not_contains`, `starts_with`, `ends_with`, `matches_regex`, `is_empty`, `is_not_empty`, `gt`, `gte`, `lt`, `lte`. ### The half-filled row There is no "wait" trigger. `row.created` fires the moment a blank row appears, so "once it has a name" is a `rowFilter` condition on the column that must be filled — not a delay. *** ## 5. What a run is told Every run carries a trigger context. AI steps are handed it as prose before their instructions, under **"What fired this run"**, so a step never has to guess which of several triggers went off. ``` ## What fired this run source: event event: document.signaturesVoided documentId: 4f0e… actorId: changedFields: completedAt, signatures, updatedAt had signed before this change: - Alexander Pelosi — signed 2026-08-07T10:14:02.000Z ``` | Field | Meaning | | - | - | | `source` | `event` \| `manual` \| `schedule` \| `api` \| `webhook` \| `button_block` \| `button_cell` \| `connector` | | `event` | Which event fired, when `source` is `event` | | `documentId` / `tableId` / `rowId` / `columnId` / `blockId` / `projectId` | Ids of what fired | | `workspaceId` | Whose data it is — the tenant boundary; a run is refused without it | | `memberId` | Who joined, left, or gained or lost access — access events only | | `changedFields` | Which fields the write touched | | `signatures` | Signature lines as they stand now — signature events only | | `versionId` / `versionName` | The saved version — version events only | | `previousValues` | The whole document before the change — pre-image collections only | | `actorId` | Who did it — **see the limits below** | | `payload` | The webhook/API body, or the connector message | **Signature events additionally get**, rendered from the above: * every signature line with its signatory name and whether/when it was signed; * on a void, **who voided it** and **everyone who had already signed** before it was voided — the current state is empty by then, so the affected signers only exist in the pre-image. > **Limit — only three events supply `actorId`.** > `document.signaturesVoided`, `document.newVersion` and `document.restoreVersion`. The first > has to work for it: the write that clears a document's signatures comes from the > collaboration server, which does not know who asked, so the signing flow stamps `voidedBy` > on the projection *before* clearing — the clearing is the change the bridge sees. The other > two are emitted directly by code that already knows the user. Nothing equivalent exists for > row, cell, clause or the other document events, so `hero:trigger/actor` on those resolves to > an empty string even though the save layer permits it. > **Limit — `actorId` is a Firebase uid, not a name.** > There is no tool that maps a uid to a person, so an AI step cannot turn it into "Alex". The > verified account email lives on the `SignatureAudits` record and would have to be surfaced > separately. *** ## 6. Addressing the trigger from a step In **prose** — an AI step's instructions, a title, an email body, a webhook body — these resolve at run time: | Token | Resolves to | | - | - | | `hero:trigger/event` | Which event started the run, by name — `document.fullySigned` | | `hero:trigger/row` | The fired row's identifier value (its readable label) | | `hero:trigger/document` | The fired document's id | | `hero:trigger/clause` | The fired block's id | | `hero:trigger/actor` | Who caused it — see the limit above | | `hero:trigger/member` | Who joined, left, or gained or lost access | | `hero:trigger/table`, `/column`, `/project` | What a structure event was about | | `hero:trigger/payload.` | A field of the webhook/API/connector body | | `hero:trigger/previous.` | That field's value **before** the change | | `hero:trigger/version.name` | What the saved version is called; bare `hero:trigger/version` is its id | | `hero:step/.summary` | An earlier AI step's summary | | `@[Name](hero:column/.)` | That column's value on the fired row | | `hero:now`, `hero:today` | Timestamp, date — note these carry no `/` segment | `hero:trigger/event` is the one slot a rule needs to tell two triggers apart, and the only way to: every other slot describes what the event was *about*, and two events about the same document look identical through them. Two rules that bite: * **Structural id fields take bare ids; prose takes tokens.** `"tableId"`, `"columnId"`, `"documentId"`, `"rowId"`, `"viewId"` and `"blockId"` are matched literally against database ids. `rowRef` and `documentRef` are the deliberate exceptions — they hold a `hero:` URI. * **`hero:trigger/previous.*` is empty unless pre-images are on** for that collection. It is never approximated from the current value. There is no `{{…}}` template syntax anywhere in HERO. A `{{trigger.email}}` in a recipient field is posted to the mail provider as a literal address. *** ## 7. Ordering, repetition and loops **Debounce — 5 seconds.** Changes are collapsed per *(automation, event, entity)*. An edit burst produces one run, not one per keystroke; the change stream coalesces anyway, so one run per burst is the honest reading. The event is part of the key because without it a rename and an update to the same document shared a slot, and an automation triggering on both had one cancel the other. The emitted events skip the debounce entirely — each is one deliberate act. **Causation.** A change an automation caused is not ignored — chaining is the point — but it carries where it came from. Each run records which entity it wrote and under which run id; a change to that entity within **60 seconds** inherits the causation chain. A run is refused before it is created when: * the chain is deeper than **3**, or * the automation **already appears** in the chain (a cycle). Refused at enqueue rather than at run time, so a self-retriggering write does not mint a failed run for every write it makes. **Queue limits.** A run is deduplicated by *(automation, row)* — or *(automation, document)* for an event trigger, or the idempotency key — rather than by automation alone, or row 2's button click would be rejected while row 1 was still running. Beyond that: **3** attempts per run, **3** concurrent runs overall, **2** per automation, and **20** chained runs per 60-second window. **Budgets** (per run, overridable per automation): | | Default | | - | - | | Wall clock | 10 minutes | | AI tool calls | 50 | | Rows touched | 200 | | External writes (webhook/email) | 10 | | Document writes | allowed | *** ## 8. Pre-images Some questions need the state *before* a write. MongoDB only answers them when `changeStreamPreAndPostImages` is enabled on the collection, and that costs a stored copy of every version. Enabled on **`DocumentSignatures` only**. That buys: * `signature.signed` distinguishing a real signing from a block being added or renamed; * the prior-signer list on a void, which exists nowhere else once the signatures are cleared. Everything else is derived from `updatedFields`, which names exactly the fields whose values actually changed — verified: a persist that rewrites `completedAt` to the same value reports only `updatedAt`, so a keystroke cannot fire a signature event. Not enabled on Rows, Cells, Documents or Blocks: deletes are soft, so the "before" state is still readable in the database for 48 hours, and the events that would need a pre-image are already answered by `updatedFields`. The command is not part of MongoDB's Stable API v1, and the app connects with `strict: true` on purpose, so it runs on its own short-lived connection. If it fails the streams still open and the affected comparisons degrade rather than being silently approximated — the warning at boot names the collection. *** ## 9. Checklist for "it never fired" 1. **Is the automation enabled?** **5** consecutive failed runs disable it and notify the owner — a silently dead automation is worse than a noisy one. 2. **Does the filter key exist on that event?** `tableId` on a document event matches nothing (§3). 3. **Is there a `hero:` URI in a filter?** It is compared literally (§3). 4. **Is the trigger scoped to the wrong project?** `projectId` is honoured now (§3). 5. **Does the condition kind match the trigger kind?** `fields` on a row trigger, or `rowFilter` on a document trigger, matches nothing (§4). 6. **Does the condition filter a relation column?** It always evaluates false (§4). 7. **Is it `row.enteredView` / `row.leftView`?** Not implemented; refused at save. 8. **Is the trigger a `button`, `webhook` or `api` type?** Superseded and no longer read; the webhook and API entry points are properties of the automation now (§1). 9. **Did an automation cause the change?** Depth >3 or a repeat in the chain is refused (§7). 10. **Was it within 5 seconds of another change to the same entity and event?** Debounced into one run (§7). 11. **Is it a signature event within 30 seconds of a version restore?** Suppressed — a restore is not a signing (§2). 12. **Is it `document.updated` after a move, publish or rename?** Those fire the specific event only (§2). 13. **Is it `document.newVersion` on an AI edit?** AI undo checkpoints are not versions (§2). *** ## Where this lives | Concern | File | | - | - | | The event list | `packages/script-shared/src/types/Automation.ts` | | Change → event, filters, debounce, causation | `apps/script-server/src/services/automation/automationEventBridge.service.ts` | | Cycle limits | `…/automation/automationCausation.service.ts` | | Conditions | `packages/script-shared/src/utils/automationCondition.ts`, `tableFilterEngine.ts` | | Slots per trigger | `…/automation/automationReference.service.ts` | | Token resolution | `…/automation/actions/interpolate.ts` | | Trigger context as prose | `…/automation/actions/ai.actions.ts` | | Signature projection | `apps/hero-hocuspocus/src/services/editor.service.ts`, `packages/script-shared/src/services/signatureProjection.service.ts` | | Version events, restore suppression | `apps/script-server/src/services/snapshot.service.ts`, `…/controllers/snapshot.controller.ts` | | Workspace / collaborator events | `…/services/workspace.service.ts`, `…/services/invitation.service.ts`, `…/services/document.service.ts` | | Webhook and API entry points | `…/controllers/automationHook.controller.ts`, `…/automation/automationWebhook.service.ts` | | Save validation | `…/automation/automation.service.ts`, `apps/script-server/src/schema/automation.schema.ts` | | Stream wiring | `apps/script-server/src/services/mainStreamDB.service.ts` | | Pre-images | `apps/script-server/src/services/server.service.ts` | # Starting a workflow from your own service Source: https://developers.myhero.so/automations Send data into HERO from anywhere and start an automation with it — how to authenticate, what to post, and how a workflow reads the fields you sent. An automation is a workflow in a HERO project: something happens, and HERO does something in response. Most start from a change in your workspace — a row is added, a document is signed. This page covers the other way in: **your service posts data, and a workflow runs with it.** Any automation can be started this way. There is no trigger to add and nothing to switch on beyond the credential you use. ## Two ways in > [card] Webhook > > For another service calling HERO. Authenticated by a secret that belongs to > one automation, so the caller needs no HERO account. > [card] API > > For your own code. Authenticated by your personal token, so the run records > who started it. ### Webhook ```bash theme={null} curl -X POST https://app.myhero.so/hooks/automations/aut_9f3k2m8xq1p7w4vz6nrb \ -H "X-Hero-Webhook-Secret: whsec_…" \ -H "Content-Type: application/json" \ -d '{"email":"ada@example.com","plan":"pro"}' ``` Find the URL and generate the secret in the automation's **Trigger reference** panel. The secret is shown once — only a hash is stored, so it cannot be recovered later, but it can be rotated at any time. Generating that secret is what allows webhook calls. Rotating it invalidates every caller using the old one; there is no separate switch to turn off. > [!NOTE] > > The secret may be sent as `X-Hero-Webhook-Secret` or as > `Authorization: Bearer whsec_…`, whichever your service can set. ### API ```bash theme={null} curl -X POST https://app.myhero.so/v1/automations/aut_9f3k2m8xq1p7w4vz6nrb/run \ -H "Authorization: Bearer hero_ak_…" \ -H "Content-Type: application/json" \ -d '{"email":"ada@example.com","plan":"pro"}' ``` The API runs the automation **as its owner**, not as you — so it can do whatever the owner could, with the owner's AI credit. Because of that it takes **edit access** to the automation's project: a token that can only read it is refused with `403`. ## What you can post Any JSON body, up to **1 MB**. An object or an array both work — a service that batches events into a list is a normal caller, not a special case. A body larger than the limit is refused with `413` rather than truncated, so a run never acts on half a message. > [!NOTE] > > Both surfaces accept **200 requests per minute**. Above that you get `429`. ## Reading the fields you sent Anywhere a step takes text — an email body, an AI instruction, a cell value — write a `hero:trigger/payload` token and HERO substitutes what you posted. Put a **dot** after `payload`, then use **slashes** to go deeper: | You posted | Token | Resolves to | | - | - | - | | `{"email":"ada@example.com"}` | `hero:trigger/payload.email` | `ada@example.com` | | `{"user":{"name":"Ada"}}` | `hero:trigger/payload.user/name` | `Ada` | | `{"answers":[{"text":"Yes"}]}` | `hero:trigger/payload.answers/0/text` | `Yes` | | `[{"id":"evt_1"}]` | `hero:trigger/payload.0/id` | `evt_1` | The `@` menu offers **what you posted** as a starting point and inserts `@[what you posted](hero:trigger/payload)`, which resolves to the whole body. Add the path yourself to narrow it to one field — the label is only what you read, the part in brackets is what resolves. > [!WARNING] > > Only the first separator is a dot. `hero:trigger/payload.user.name` is not a > path and resolves to nothing — use `hero:trigger/payload.user/name`. A field you did not send resolves to an empty string, not to the token itself. A step that depends on one will act on a blank rather than fail loudly, so branch on it if it matters: ```json theme={null} { "kind": "value", "conjunction": "and", "predicates": [ { "left": "@[Plan](hero:trigger/payload.plan)", "op": "is", "right": "pro" } ] } ``` ## Routing one endpoint to different work Services that send several kinds of event usually post a type field. Start one automation, then split on that field with a **path** step — one branch per event kind, and a fallback for everything you have not handled yet. That keeps one URL and one secret per integration, rather than an automation for every message type your service might send. ## Checking what arrived Open the automation and expand a run. A run started by a post shows **What was posted** — the exact body HERO received. Reach for it first when a step produces nothing: almost always the field is nested a level deeper than the token assumed, or the service names it something else. The run cannot tell you that a field was missing, because a missing field and an empty one resolve the same way. ## Responses | Code | Meaning | | - | - | | `202` | Queued. The body carries `runId` — poll the run for its outcome. | | `401` | Unknown automation, or the wrong secret. Deliberately the same answer for both, so the endpoint cannot be used to discover which automations exist. | | `403` | API only: the token can read the project but not edit it. | | `409` | The automation is turned off, or already has a run pending. | | `413` | Body over 1 MB. | | `429` | Over 200 requests per minute. | ### Not sending the same thing twice Send an `Idempotency-Key` header — on either endpoint — and a repeat of the same key returns the original run instead of starting another: ```bash theme={null} curl -X POST https://app.myhero.so/hooks/automations/aut_… \ -H "X-Hero-Webhook-Secret: whsec_…" \ -H "Idempotency-Key: evt_01HZY3" \ -H "Content-Type: application/json" \ -d '{"email":"ada@example.com"}' ``` The response is `200` with `replayed: true`, so a service that retries on timeout cannot run your workflow twice. Use the sending service's own event id. # Changelog Source: https://developers.myhero.so/changelog Updates to the HERO API. **2026-10-31** The AI can now act across HERO, not just write in it: send for signature, share, comment, restore versions and manage your automations right from chat. Nothing leaves HERO until you click, and it answers in about half the time. **The AI does more** * **Signing:** send a document for signature, see who has signed, and resend or cancel. * **Sharing:** share documents, invite people to your workspace and see who has access. * **Comments:** read, add, answer and resolve comments, and react to them. * **Versions:** save, list and compare versions, and restore one. * **Automations:** set up, change and delete your own automations, and ask how their runs went. * **Files:** import a Word file or PDF as an editable document, turn a spreadsheet into a table (attach .xlsx, .csv or .tsv in chat), and export to Word. * **Documents and tables:** read and change document settings, including numbering and where terms come from, and assign people in person columns. * All of this works from Claude and other connected assistants too. **You stay in control** * Anything the AI would send waits for your click. A card in chat shows the documents, who gets what and the message, with Send and Cancel. * An automation that emails people or sends data out is saved switched off, with a card listing where each run would reach, and you switch it on. * Say "undo that" in chat to take back the last change. An AI edit, undo or restore keeps what you've just typed anywhere else in the document. **Faster, better writing** * Chat finished the same tasks in about half the time in our tests, with fewer steps. * The AI panel opens as a floating card with slightly smaller text. It leaves the header where it is, the page makes room beside it so a table's last columns and a PDF stay in reach, and its working notes go in the steps card, leaving the reply clean. * Asking for a document gets a complete one, start to finish, with its signatures and dates. A length you name is the length, and contracts take their parties, dates and amounts from a table row. * Documents come out clean, with no stray markdown symbols in the text or in table cells. * The AI reads and cites clause numbers as the editor shows them. Cross-references link every clause they name, schedules link live as "Schedule A", and a definition written in quotes becomes a defined term. * When the AI rewrites a clause it keeps the placeholders, terms, references and badges inside it, and comments move onto the new words. * Claude Opus 5.5 replaces Opus 5, and saved chats and automations move across. **Connected HTML blocks** * Each block keeps a thread of its AI edits, so "make that red" knows what "that" was. * **Edit with AI** shows the earlier edits as a chat, shared with the document's editors. Expand it to carry on in the AI panel. * Widgets run in document previews, always open at their full height, and the **Data** section says what a widget does in plain words. **Signing** * A signed document shows its execution date and carries a mark in the sidebar, which updates live for everyone on the document. Its popover leads with **Create version** and **Signing details**, and double-clicking the page opens a new version. * A signature block's settings gear holds its terms, with Delete and **Send for signature** in one place. * On the signing page, another signer's block shows a greyed-out Sign button and the header says when to press Sign. * The signature step in automations emails the signing link to workspace members too. **Word & PDF export** * References to another document's clauses name it once, at the end of the run: "Sections 2.1, 2.2 and 2.3 of Services Agreement". * PDFs, previews and signed copies number a document exactly as the editor does, even one that has never been opened. * A HERO box exports as a box in Word. **Automations & icons** * The **Insert blocks** step is gone: an AI step now adds to a document properly, formatting included. Saved automations that use it ask you to switch to an AI step. * A notify step no longer tells you about something you just did yourself, like signing a document. * Eighteen new legal and business icons, including a gavel, briefcase and handshake, plus thumbs up and down, everywhere HERO has icons. **Fixes** * **Documents** * HERO picks up where you left off after your computer sleeps: a document no longer sends you home, and live tables and Word files reconnect on their own. * Linking to another document's clause needs only read access to it. * Settings lock on a document that's signed or out for signature, and an open document updates when its settings change elsewhere. * Project and folder covers list documents in the sidebar's order. * Copying a document into another project brings the terms document it imports. * **Signing** * A signature block's settings close the moment it's signed or the document locks, and undo works straight after deleting a block from them. * **Tables** * Amounts like "€1.200,50" read as 1,200.50 from the AI, spreadsheet imports and dashboard filters. * Columns and rows added at the same time are all kept. * **AI** * A long chat keeps working past 500 messages, and a run that fails partway keeps its changes undoable. * Comparing versions sees a changed date, placeholder or reference. * Charts the AI writes draw their own figures, never sample data. * Word files are read and edited with the Word tools, and a redone PDF replaces the one before it. * **Import** * A PDF clause that fills its last line no longer swallows the next one. * A witness signing beside "in the presence of:" imports as a witness signature. **2026-10-27** HTML blocks become small apps that run on your own data, Word documents and PDFs import the way they look, and signed PDFs match what you export. **Connected HTML blocks** * HTML blocks can now work with your project's tables. A widget shows live data, and people can add, edit and remove rows from it: a booking form, a poll, a tracker or an approval board. * Ask the AI for one and it builds the widget and creates the tables and columns it needs, instead of copying your data into the page. * Widgets follow the page's filter bar, and their own buttons can drive it. Signed-in readers' names fill in "who" fields for them. * A widget reads and writes as the person using it, so everyone sees only what they're allowed to. The block's new **Data** panel shows what it's connected to, with two switches: let readers see data they otherwise couldn't, or let visitors add rows, so a published page can take sign-ups and form entries. * Before you publish, HERO lists the table data a page's widgets would make public. * Widgets stay live: changes stream onto published pages as they happen, and sharing, role changes or flipping a switch turn a widget on or off with no reload. A widget that fails to load retries by itself. * A copied widget reconnects to the copied tables. * Pages with many widgets stay light: widgets far off-screen pause, and load again before you scroll back to them. **PDFs become HERO documents** * Importing a PDF now asks whether to keep it as a PDF or convert it to HERO. A converted PDF becomes an editable document with its clauses, defined terms, references and signatures, just like a Word import. * Paragraphs, bold, italic, underlines, footnotes, tables, bullets and indents come across, pages set in two columns read down each column, and images and web links land where they stand. Running headers, footers and page numbers are left out. * A scanned PDF has no text to convert, so it stays a PDF, and the import tells you which ones did and why. **Word import** * Imports read like the original. Clauses, lists and footnotes are numbered as Word shows them, including documents with a numbering style of their own, which HERO keeps as **As imported** and exports back to Word. * Cross-references link to the clause they point at, including zero-padded ones like "Section 8.02" and references in other languages. * A document splits into its schedules, exhibits and annexes, each named by its heading. * Signing lines become HERO signature blocks, carrying the signer's name, title and the party they sign for, shown even before anyone signs. Signature tables become side-by-side columns, and witnesses are labelled as witnesses. * Every blank to fill in reads as \[●]. Drafting notes ("Note to Drafter: …") import as a callout, and a paragraph Word draws a box round becomes a HERO box. * Formatting carries over: bold, underline, capitals, alignment, justification, superscript and subscript. Word's leftovers don't: printed page numbers, sentences split across lines, highlighter and typed spacing are cleaned up. * Web and email addresses become links, and EU regulations and directives cited by number link to their text on EUR-Lex, in the reader's language. * Defined terms are found where the document defines them, including in definitions tables and in other languages' quotation marks, and schedules can use the agreement's terms. * Typed outlines ("A." / "A1." / "1.1", "a.", "ii.", "a)") become clauses and lists, so German and Polish sub-clauses import as clauses too, and older .doc files are numbered as Word shows them, headings included. **Clauses, lists & terms** * New list styles: a), i), 1), (A), (I), i. and I., in the editor and in Word export. * A defined term is highlighted at its first mention in each paragraph, so pages no longer read as a wall of links. * A clause reference stays on its clause when another clause moves, and a term's card shows its clause's current number. **Signing** * A fully signed document shows a sign icon beside its title instead of a banner across the page. From it you can **Download audit trail** (the signed PDF with every signature's evidence and the history of its signature request) or **Start a new version**. * The signed PDF everyone receives, and the audit trail download, show the document exactly as Export to PDF does, signatures in their handwriting font, with the audit pages after it. A signer's copy prints the values, tables and linked documents as they saw them. * On the signing page, table values carry their table's colour and multiple choices show as separate badges, as they do in the editor. **AI plans** * When the AI can't run, it says why (trial ended, payment failed or monthly allowance used) and offers the next step that fits: start a trial, upgrade, update your payment or use your own API key. * Using your own API key comes with a plan or trial. **Fixes** * **Editor & tables** * The scroll arrows work on iPhone, and the project switcher fits a narrow sidebar. * Table headers line up over their columns, and hiding or showing a column redraws the rows. * A short clause that ends like a sentence reads as text, not a sub-heading. * Undoing a document delete brings back its images and files too. * Changing someone's access no longer leaves references stuck on "Loading…". * **Signing in** * Signing up or in goes straight on to your workspace, your invite or email verification, instead of back through the login page. * A first sign-in with Google or SSO no longer hangs on "Logging you in". * **AI & MCP** * Every clause reference the AI links works on published pages, and footnotes written through MCP are numbered in document order. * **HTML blocks** * A block's height survives copy and paste, and blocks made in the editor keep a readable title. * When the AI rewrites a page, widgets it didn't change stay as they were. * A block too large for the AI says to download, edit and re-upload it. **2026-10-19** Ask for a dashboard and the AI builds a live one from your tables. This release also brings newer Claude models and a faster, steadier app, from opening a document to typing in a table. **AI dashboards** * Ask the AI for a dashboard and it builds one from your tables: a filter bar, a row of figures, charts, a summary that quotes live numbers, and a worklist. Nothing is typed in by hand, so it stays current. * The AI can create, change and delete table views, and checks a preview of each one before it uses it. * New or changed views show up on open pages straight away, whoever made them. * Figure cards get short titles and the right trend direction, and money and averages show as whole numbers. **AI models** * Claude Sonnet 5.5 is the new default. Chats and automations set to a retired model carry on with the model that replaced it. * Claude models now think as hard as the task needs. * If you use your own API key, every model from that provider now shows in the chat picker and in automation steps. **AI chat** * Stop ends the AI's work straight away. * When the AI service is busy, HERO retries before anything appears. If a reply still fails, it tells you why in plain words. * Replies appear smoothly as they're written, with bold, code and links formatted from the first word instead of flashing raw symbols. Long replies stay smooth to the end. * Code blocks have a copy button. * If a reply stops partway, everything written so far stays on screen with a Retry button under it, and a connection that goes quiet is spotted instead of spinning forever. * A chat that stopped partway through a task can be picked up again, and remembers the steps it had finished. * Replies survive leaving: switching page, sending in another chat or closing the tab no longer cuts a reply off or loses it. A reply interrupted by closing the tab is kept with Retry under it. * Stop also stops a step still running, so a Word file or import it was making isn't saved. * If your own API key is rejected, HERO says so instead of showing a general error. * The composer focuses with ⌘L and keeps focus after you send. **Speed** * Documents open faster. The skeleton stays until the text is ready, so you don't see a blank page first. * Search (⌘K) keeps up with your typing, about 6× faster per key. * Tables stay quick: editing a cell redraws only its row, and hovering, typing elsewhere or opening a select no longer slows the grid. * The editor's toolbar and menus are lighter, and long sessions no longer slow down over time. * The app downloads less up front: its styles are half the size, and maths fonts load only when a page needs them. * When someone renames or reorders something, other people's tables no longer all reload. * The sidebar stays quick in big projects: selecting, clicking or moving through rows no longer redraws the whole tree. * Sorting, adding or deleting table rows redraws only the row numbers that moved, and the AI chat stays smooth while a reply streams. **Settings & notifications** * Clause styles in document settings have real names, like "Decimal", with a preview of their first three levels (1. · 1.1 · (a)), grouped by family. * Mark every notification as read with **Read all**. * The Dark theme preview shows the real dark colours. **Fixes** * **Editor** * Links can be edited and removed from the toolbar. * Every formatting shortcut works on selected blocks, including after ⌘A: bold, italic, underline, inline code and alignment. ⌘I italicises without also opening Import. * ⌘Arrow, ⌘Backspace and ⌘Enter act on selected blocks again, and after an undo or a collaborator's edit, select-all no longer swallows your next key. * Tab in a list item indents it once (and stays in the editor on a list's first item), and moving or copying blocks keeps their formatting. * Escape closes the versions panel, and a new sub-clause collapses on its own. * Previews scroll with the arrow keys and copy with ⌘C, and a preview of a deleted document says Not found. * A term defined inside a list item shows its glossary entry. * **Tables** * Number, money, date and phone cells handle input properly: a minus sign, \$0, national phone numbers like (415) 555-2671, and opening the calendar with the arrow keys. * Escape stops editing a cell instead of leaving the page, and changing a column no longer loses what you're typing. * Changing a column to Checkbox or Approval warns you first, and adding a Linked Value column works again. * Time, currency and relation cells update when someone else changes them, and formulas that read a linked row update when that row is deleted. * Formula filters offer a date or number input, and checklist views keep their own settings. * Charts keep every label and show money in its own currency, with its decimals. * Row numbers follow a sort, insert or delete, and removing a relation link keeps links added since. * Undoing a column type change brings back deleted rows readable, and unreadable text in a date-range cell goes back to the range. * The AI's first look at a table no longer changes how that table shows for everyone. * **Navigation** * PDFs and Word files open correctly from breadcrumbs, search and project overviews, and their icons can be changed. * Renaming from an overview saves to the item on screen, and deleting the folder you're in takes you back to the project. * Enter in search opens the highlighted result, and filtering the command menu keeps an item selected. * Shift+N in a folder's menu creates a folder, and pasting into a cover title pastes text. * A cover's reference and description show straight away, and renames, icon changes and site settings save even after a page has been open for over an hour. * **Publishing & settings** * Published pages show your edits within 5 minutes, and so do their link previews. * HERO links shared in chat apps, email or social posts show a preview image again. * Saving a page password, homepage or branding tells you if it failed, and a site's homepage must be one of its own published pages. * Published pages with an uploaded logo show it as their link preview. * On a phone, picking a notifications tab shows that tab. * Account and Profile show an error instead of a blank form, and a name of only spaces isn't accepted. * Documents created through the API appear in the sidebar. * AI steps in automations stop at the plan's AI allowance and say so. *Under the hood: the whole app moved to the latest version of its interface engine, which keeps HERO current and ready for more speed work.* **2026-10-14** Get documents signed by anyone, from anywhere — no account needed — with a redesigned AI chat, numbering for every kind of agreement, and AI that finishes your sentences. **Signing** * Send any document to anyone to sign by email. Signers open the link and sign — no HERO account, and no joining your workspace. * Send several documents at once from the Signatures page, the document tree or a document's send dialog. Each signer gets one email and one link, and the documents complete together. * Choose the signing order: each person is emailed when it's their turn. * Leave a name, address or date blank and your signer fills it in before signing; their answers go straight into your table once everyone has signed. * Signers agree to sign electronically once per project rather than on every document, and can change their mind at any time. * Signing emails arrive as "*Your name* via HERO", replies come straight back to you, and you'll know if an email couldn't be delivered. * When the last person signs, everyone receives a PDF of the finished document. Automations can send documents for signature too. * A signature records exactly what the document showed when it was signed, so any later change to the details it displayed is easy to spot. **For your signers** * Everyone you send documents to gets their own signing page for your project: what's waiting, what they've signed and what's next. They can stay signed in on their device for 1, 2 or 7 days. * It feels like HERO — the same sidebar, resizable and remembered, a light/dark toggle and a print button — and it fits on a phone. * Signers can search the document with Cmd/Ctrl+F, open the files and clauses it links to without leaving it, and jump straight to where they sign. * They can sign out of every device in one click, and an expired session offers a fresh link with their email already filled in. **A Signatures page for every project** * See everything you've sent, grouped the way you sent it, with who has signed and who hasn't. * Resend or cancel in a click, and set up your signing page from the same place. **AI** * A redesigned chat: the side panel and full page share one design. A steps card shows what the AI is doing and sums it up when it's done, a changes card keeps Review, View and Undo in reach, and replies show tables and lists properly. * As you write, HERO suggests the rest of the sentence in grey — press Tab to accept, or keep typing. Turn it off in **Settings → AI**. * Ask HERO's AI, or Claude and other connected assistants, to add a PDF to a project or create a new one. * HERO chat and automations can save Gmail and Outlook attachments, and files from Claude, straight into the right project. **Writing & numbering** * New built-in clause styles for agreements organised by article (ARTICLE I / Section 1.1 / 1.1.1 / (a) / (i)) and the common commercial ladder (1. / 1.1 / A. / (i) / (a)), plus "(1)", "(a)" and "(i)" list formats. * New document settings let you skip a clause level instead of filling it in, and hide the number of a sub-clause that stands alone. * A clause reference can show just the clause's own number, as in "clause (f)". * Autocomplete finds what you mean from a few letters of each word ("mas sup agr" finds *Master Supply Agreement*), ranks what fits the sentence first, opens on a number from its first digit, and gives each linked table its own dropdown. * Floating buttons on every document and published page jump to the top or bottom, and collapse or expand every section at once. **Imports** * Agreements imported from SEC filings keep their own clause numbering, cross-references, tables, headings and formatting. * Import PDFs of up to 100 MB. **Skills** * Every skill has its own icon and shows how often it's used. * AI answers show which skills shaped them, and HERO's AI offers to save a preference you keep repeating as a skill. **Fixes** * **Signing** * Cancelling, declining or deleting a document that's out for signature always closes it and lets everyone know. * Filling in details while signing is quicker, and term and clause previews show their values. * If HERO can't check your documents before sending, the send dialog says so and offers Try again instead of loading forever. * **Documents & PDFs** * Exported PDFs and published pages show every value from a related table, instead of the column's name. * Very long words stay inside the margin, quotation marks stay with their words, and table rows break across pages more cleanly. * Defined terms highlight as whole words next to brackets, quotes and plurals, and pasted definitions stay highlighted after a reload. * Document previews number their clauses exactly as the editor does, and comparing two versions opens without an error. * ©, ® and ™ stay as text instead of turning into emoji. * **AI & automations** * "New mail arrives" automations save properly, and AI can build one for you. * Word files attached in chat are read in full by the AI. * An email's attachments are filed once, even when two automations save it at the same time, and two attachments with the same name are both kept. * **Search & published pages** * The command menu shows the best match first, so "sign" finds Signatures, and clearing the search puts everything back in order. * Published pages remember your light or dark choice. *Under the hood: changes save faster, and live collaboration is more reliable on an upgraded platform.* **2026-10-01** Interactive HTML blocks on the page, workspace Skills in the open SKILL.md format, and read-aloud for whole pages. **HTML blocks** * Type `/html` to add a block that runs a self-contained HTML widget on the page. Upload an `.html` file, paste code, or describe what you want and have AI build it. * Widgets take HERO's own colours, fonts and components, follow light and dark mode, and fit any width. * The HTML prompt takes the page it sits on plus any documents, folders, tables or files you add, and autocompletes references as you type. * Widgets stay on their page: links open in a new tab, and removing someone's access or unpublishing a page takes effect at once. * Embedded sites can no longer navigate the HERO tab or see which document they're on. **Skills** * Import or write a skill in the open Agent Skills `SKILL.md` format — the same one Claude and a growing set of other agents read. * A skill is an ordinary HERO document, made from the New menu with its own icon. * The editor offers only the blocks the format can carry, so a skill exports and re-imports without losing anything, and importing brings in the whole skill folder. **Read aloud** * Read a whole page, not just a short selection. * Audio streams so playback starts sooner, and replays don't cost again. * Placeholders, dates and references are read out instead of skipped, in one consistent formal voice at 1.35× by default. **AI writing** * Documents, PDFs, web pages, tables and listings are read a page at a time instead of being cut off, so the AI sees the whole thing. * AI writing follows a shared design system: a color ladder, block usage notes, fifteen ready-made layout patterns and six page archetypes. * The AI names documents in plain Title Case, files them in a folder per party, and puts "Schedule A"-style numbering in the reference beside the name. * Callouts written in markdown keep their icon and color, and a numbered heading ("2. Fees", "2.1 Late payment") becomes a clause at the right depth. **Document tree** * Sort the sidebar by Manual, Name, Date created or Last edited. * Reordering inside a folder sticks. **For developers** * [`POST /ai-agent/generate-html`](./api-reference/ai/ai-generate-html-block) generates or revises a widget and streams it as Server-Sent Events. * HTML block files: [`POST /media/html`](./api-reference/media/create-html) stores a version, [`GET /media/html/{htmlId}`](./api-reference/media/get-html-by-id) reads it back, [`POST /media/html/{htmlId}/duplicate`](./api-reference/media/duplicate-html) copies it to another document, and [`GET /media/html/{htmlId}/render-url`](./api-reference/media/get-html-render-url) returns a URL to render it. The `htmlBlock` node points at its file by `resourceId`, and `read_document_content` returns each block's HTML in its `html` attribute. * MCP clients can write HTML blocks with a ` ```html-block ` fence in extended markdown, and get the full design guide from `get_hero_design_guide` before writing a page, report, brief, proposal or playbook. **Fixes** * **AI editing** * A failed AI edit can no longer empty the live document. * Patching or appending a clause no longer adds empty parent clauses, and inserting missing parent levels no longer crashes or splits text. * Placeholders copied from another document point at the right rows, and money keeps its currency. * AI table tools follow the same rules as the app, and say what they didn't write. * **MCP** * Clients see real parameter types, can find the row tools, and can tell a failed call from a successful one. * **App** * Saving one user setting no longer wipes the others, and switching light/dark lands in one frame. * Exported clause titles print in black, a pie chart in a narrow column draws its slices, and the editor's block menu opens again instead of sticking. **2026-09-25** An engine rebuild you feel more than see — and it makes the whole app faster, not just tables. HERO no longer loads your entire workspace into your browser, so everything opens quicker; on top of that, tables scale to serious data and become dashboards you build yourself. **Speed** * Big tables just open now: filtering, sorting and search run on the server, and a table loads a page at a time (choose 10/25/50/100, remembered per table). * No more local copy of anything — HERO used to mirror your whole workspace into your browser before it felt ready. Data now comes straight from the server, fresh, in the size you need. * Every view loads what it shows: lists as you scroll, calendars a month at a time, boards in one go with true counts, and a hidden table nothing until it's opened. **Dashboards** * Drop a parameter bar into a document and add live charts and tables built from your data. * A page-level parameter filters every block at once, and clicking a chart category cross-filters the whole page. * Readers can re-scope a published dashboard without changing it for anyone else. **Tables** * New column types: **Timer** (clock sessions with a live running total, and feed it into a formula so time × rate = money), **Approval** (a sign-off in the row) and **Reference** (point a cell at documents or clauses, picked with `@`). * New views: **Checklist**, with a deadline window counted from today, and **Figure**, with inline figure references. * Nested AND/OR filter groups, and formulas that roll up conditionally across a relation. * A spreadsheet column can come in as **Progress** ("42%", "3 / 10", "20 of 53 steps") or as a **User**. **Fixes** * **Sharing & access** * People limited to some rows of a table see only those rows — in tables, search, AI, live updates and copies — and losing access takes effect immediately. * Guests on a document see only that document and their own automation runs. * Workspace API keys stay inside their workspace; invites and licenses go only to the verified owner of the address. * Documents kept in your browser are cleared when you sign out. * **Copying** * Copied documents keep their tables' values, relations, inline figures, cards and version columns. * Pasting into same-named tables joins them — rows, views and cards included — while deleted rows and personal row grants stay behind. * **Automations & live updates** * One edit starts one automation run, an automation's own writes can't loop it, and button cells show their run's status. * Live updates reach every reader once, in order, and two people editing a linked row at once no longer overwrite each other. * **Exports, filters & figures** * Large CSV exports stream a page at a time, never come out empty, keep values under their own headings, and open safely in Excel. * Date filters use the day a cell shows, figures take their currency from the rows they measure, and search's "All" finds results inside a project again. * Undoing a formula or column-type change via AI says it can't, instead of claiming it did. **Under the hood — by the numbers** * Opening a big dashboard's tables: **573 MB → 1.9 MB** (295× lighter). * Startup payload: **\~122 MB → \~54 MB**. * A table page that used to freeze for **70 seconds → instant**. * Turning a page: **312 ms → 90 ms**. Loading a dashboard: **17 requests → 2, 2.5 s → 0.6 s**; all its charts drawn **363 ms → 114 ms**. * On a 30,000-row table: changing a column's type **1.5 s → under 0.1 s**, adding a column **3.8 s → \~0.1 s**. * App download **\~20% smaller (22.6 MB → 18.1 MB)**, and first paint on a big table page **3.0 s → 2.3 s**. * The storage rebuild was verified 1:1 — **54,306 rows rebuilt from 1.55 million cells across 1,468 tables, every one identical**. **2026-09-08** HERO reaches out to the tools you use, works on your phone, and its tables get genuinely relational. **New** * **HERO on your phone** — the whole app now works on mobile, rebuilt around a native-feeling sidebar, drawer and command menu. Pull down past the top of a document to reach AI, search and quick actions; tap a term or reference to read its full definition or clause; and it sits correctly under the Safari toolbar. * **Zapier integration** — 63 HERO operations exposed as single, composable steps: trigger a workflow when something changes in HERO, or let another app create documents, add rows, request signatures, and more. Zapier connects over OAuth and gets REST-hook subscriptions that can watch several projects or tables at once — and it's all built on a shared integration layer, so more platforms are coming soon. * **Signed webhook deliveries** — every outbound delivery to a subscription is signed (`X-Hero-Signature`: HMAC-SHA256 over a timestamped body), so your endpoint can confirm it genuinely came from HERO and reject replays. * **Relations that make sense** — narrow a link column so it offers only the valid rows (no more one-table-per-permitted-set), flag links that no longer fit their filter, and let a formula reach across a relation to read a column on the row it points at (with `@` offering those columns). * **Filters you can describe** — type what you want in plain English ("signed contracts this quarter with no effective date") and HERO builds the filter; combine conditions with **OR**, and each field offers only the operators that fit it. * **Smarter CSV import** — choose which columns to import, and preview exactly what HERO will build (columns and inferred types) before it builds it. * **Versioned reference sets** — mark a table as a versioned terminology set, and a document records which release it was written against, so you can see which documents are affected when terms drift. **Improved** * **Refreshed interface** — a lighter, more consistent look on desktop; on mobile, a ground-up redesign built for touch. * Faster start — returning users skip the splash wait, and the app no longer holds longer than it needs to. * Export or send any node straight from its breadcrumb (right-click or menu). * Every toast now has an X and swipes away; a type change says what it will cost before you make it. **Fixed** * Loading a document no longer risks dropping the live-collaboration connection mid-handshake. * The slash menu can't scroll the document out from under you; single-select chips follow renames instead of showing stale text. * Counting linked rows counts links, not commas; a cell edit no longer leaves the linked table stale. **2026-08-24** The follow-through to 1.21 — sharper automations, keyboard-first navigation, and conditions you can actually see. **New** * **Command palette everywhere** — quick actions now reach Tables, Automations, the AI page and chat, Settings, Plans, Home, and a Switch-workspace list, all from the keyboard. * **AI writes real cross-references** — when the assistant writes "see Section 2," it becomes a live clause reference that stays correct as the document changes, not dead text. * **Automations that ask before they run** — turn on "Run with data" for a manual automation and starting it prompts for input that reaches the steps as the run payload. Any step can quote it back with the "What you typed" reference, from every way of starting the run. * **New workflow steps** — find a document or a row rather than pinning one, create a table, add a column, delete matching rows, set a document's reference, and delete a document. Each is a step now, so a workflow no longer spends an AI step on a lookup. * **Automations understand the triggering document** — a workflow started by a document event (e.g. a signature) can act on the row that document is about, so "when this NDA is signed, set its Effective Date" works. * **Conditions you can see** — per-step "only if…" conditions and the automation's own top-level condition are now visible in the builder and honored at run time; references throughout show real names and colours. * **Faster keyboard entry in tables** — every add-row field is reachable by Tab, the form is fully keyboard-usable, and a defaulted row is named after the table instead of coming up blank. **Fixed** * Inviting a member to a workspace no longer crashes the app. * A workflow started from a button in a document now receives what you typed, the same as "Run now" does. * A workflow that stops early — no matching template, not the counterparty — shows amber rather than green, so a run that did not finish no longer reads as one that did. * Undo and redo work in the workflow description box. * An empty select in a form no longer shows a small box where its value goes. * A finished workflow announces itself once. Notifications, invites and access requests could all arrive twice. * Signed documents no longer falsely report they've changed, with a repair pass for affected ones. * Desktop location cells that were dead in released builds work again; three stray debug switches were turned off. * The table type picker no longer opens behind its own dialog or freezes the page; a new folder no longer borrows a displaced row's icon. * Buttons show a table's own icon and colour; a failed Word import now says why. **2026-08-11** A relaunch, not a patch — automations, published sites, a new color system, and legally defensible signatures. **New** * **Automations** — build workflows that run themselves: **when** something happens, **do** something. Author from a plain-English prompt (it lands paused for review) or on a drag-and-drop canvas with nested **If … otherwise …** paths that compare any two values, plus a Stop step. Triggers: schedule, incoming email, webhook/API (carrying its payload), table/column/project changes, people joining or gaining access, clause/term/signature events, and saved/restored versions. Actions: run an AI step, send email from your own mailbox, **call any API and use what comes back** (auth, POST/GET/DELETE, Slack), request a signature, create documents/folders, write formatted content into a document, edit cells/columns, wait, and more — with live run streaming, mid-run stop, and its own page/link/icon per automation. * **Connectors** — connecting Gmail, Outlook, or another service lets you choose exactly what access to grant at connect time: read-only by default, sending or file changes as a deliberate opt-in, and only the minimum scope each needs. * **Automation ownership** — each automation shows who owns it (runs use the owner's connected accounts and AI credit), the Connectors and Trigger-reference tabs are owner-only, managing an automation is separate from authoring its steps, and a departing member's automations move with them. * **Smarter buttons** — a button's destination is now one field: a URL, a link to another HERO document (clicking navigates in-app, no new tab), an automation to run, or a table (clicking opens its add-row form). The chosen target shows as a chip; buttons pointing at an unreachable document show as disabled. * **New color system** — nine coherent hues replace dozens of near-duplicates across icons, highlights, select tags, sections, and collaborator cursors; a six-color theme-aware text highlighter; colored inline code; every token derived from one source so light/dark always agree. * **Legally defensible signatures** — server-side signing captures time, IP, device, and a document hash into a tamper-evident audit trail; signed documents lock automatically, and voiding records who unlocked it. * **AI file attachments** — the assistant can upload an image, video, or audio file and create a document containing it. * **Bring your own AI key** — add an OpenAI or Anthropic key in **Settings → AI** and every AI request, automations included, runs on your account instead of your monthly credits. Choose per provider, so you can keep one on your plan and one on your key. Your own key draws down no allowance and unlocks every model that provider offers; spend on it is reported separately. Keys are stored encrypted and never shown again. **Improved** * Tables: see and change each field's type inline; add rows through a form so they're never blank. * One-click Export to Word or PDF from quick actions. * AI web search runs exclusively through a data-protection-covered provider; AI undo checkpoints no longer clutter version history. * `@`-mentions can match a clause by its number. **Fixed** * Find-and-replace no longer corrupts text after a defined term. * Version compare no longer crashes. * Unchecked table checkboxes stay visible without hovering; export pill labels survive PDF conversion; inline code renders cleanly across wrapped lines. **2026-07-30** **New** * **Computed columns** — describe a formula column in plain English and HERO compiles it into a real, validated formula, filling every row and recomputing as dependencies change. `@`-reference other columns (relation/select/one-to-many included), live preview, per-row error tooltips, a full text/number/money/date/logic function library, and AI-authored columns via `set_computed`. * **Per-row permissions** — grant one specific person viewer or editor access to one specific row without changing their role elsewhere. A Permissions dialog on the row/table menu shows who can reach a row and how; select multiple rows to manage them together (audience grouped per row, add/remove across the selection). Managing row access is reserved for workspace admins and owners. * **Media columns** — the image column type now holds images, video, and audio together (relabelled "Media"); the audio player gained a playback-speed picker. * **Rebuilt tooltips** — floating-ui powered: open when the pointer settles, stay pinned through scroll, nested tooltips stay open, and mobile tap-through is fixed. * **Title autocomplete** — autocomplete now works in the title block. * **Published embedded rows** — published documents show the rows an embedded table view lists, matching what an invited collaborator sees. * **Resilient AI chat** — the agent stream heartbeats through long thinking/tool calls, and a dropped connection shows a clear message with a Retry that resumes where it left off. **Improved** * **Word/PDF export**: section titles stay with their content across page breaks, table column widths carry into the `.docx`, code blocks export monospace, embedded references and form blocks no longer vanish, and large conversions get a longer timeout. * Word import preserves unknown wrapper structures and keeps numbers in "Section 4.1" cross-references. * AI-inserted ISO dates render like picker-chosen dates. * Top search ranks exact title matches first. * Save as PDF is now a secondary icon-only button. **Fixed** * The term-finder no longer breaks pasted code blocks. * Restored the attachments toggle when sending; media blocks no longer interrupt the send scan. * Tables show an honest "No access" message instead of asking you to refresh. * Scrolling a wide column no longer drags the whole page sideways. **Breaking** * The legacy per-cell "Cell Math" formula column type has been removed in favor of computed columns. Columns already using it keep working and stay editable, but it's no longer offered for new columns. **2026-07-22** **New** * **AI-generated Word documents** — the assistant produces real, downloadable `.docx` files (up to 10 at once), saved into your project; available from every model and over MCP. * **Edit `.docx` over MCP** — the Word-editing tools are now exposed to connected apps like Claude. * **Model picker for everyone** — every user can choose their AI model (previously developer-only); the choice persists per chat thread. Premium models draw down your plan's AI allowance proportionally to cost. * **"Undo that" over MCP** — reverse AI changes made through connected apps, repeatably, across documents, tables, and placeholders. * **Per-placeholder highlight toggle** — flip an individual placeholder or reference from the highlighted pill to plain, style-inheriting text. * **Searchable row selectors** — filter and sort rows when linking to a record. **Improved** * Robust PDF form filling — complex real-world forms (damaged structure, page-only fields) fill correctly and stay interactive. * Save as PDF uses the document's name for the download filename. **Fixed** * Table picker: Enter selects the highlighted table, not the first in the list. * Checkbox cells are centered and toggle from anywhere in the cell. * All table cell types align to a shared baseline. **2026-07-17** **New** * **Better text cells** — click to place the caret exactly where you tapped, fill-height scrollable cells, and an expandable text input. * **Multi-select editing** — open the item editor straight from a multi-select chip. * **Upload progress** — an animated indeterminate bar while media uploads. * **Fading document names** — long names in the tree fade like overflowing table cells. **Improved** * Enlarged the string-cell edit card and dropped the hover tooltip; checkbox centered, location muted. * Text cells re-render less, so big tables stay smooth. **Fixed** * Backspace reliably deletes empty blocks inside columns. **2026-07-16** **New** * **MCP OAuth 2.1** — the HERO MCP server now supports OAuth 2.1 with dynamic client registration and discovery, ready for the Claude directory. * **Drag to select blocks** — drag across blocks to select them, with the cursor landing between blocks as you go. * **Smarter string cells** — fade overflow, reveal the full text on hover, and edit in a popover card. * **Gallery multi-image covers** — browse multiple cover images in a carousel. * **Auto-saving badges** — badge edits save as you go. **Improved** * Visible keyboard focus app-wide; Enter honors the focused button; alert dialogs trap Tab. * Media uploads as raw binary with a 50MB limit and real error messages. **Fixed** * Map pins and markers no longer vanish when flipping between light and dark theme. **2026-07-09** **New** * **A new block-selection experience** — unified block selection, drag-head, and trailing-pad handling. * **Redesigned badges** — click-to-open menu with live preview, keyboard-first, no save step. * **Mention a record, then a column** — reverse `@` lookup that starts from a record. * **Cross-workspace search** — Quick Navigation finds projects across every workspace. * **Number column decimals** — set fixed decimal places (or keep default). * **Self-setting-up blocks** — icon, button, media, and database blocks auto-open on insert. * **Smarter containers** — columns and tabs behave as proper containers, with live 10% resize snapping. * **Cleaner embeds and more icons** — borderless auto-sized embeds; new icons including arrows. **Improved** * PDF form filling handles forms that defeat pdf-lib via a pdf.js fallback. **2026-07-02** **New** * **Sync cards** — one shared card template across Board, Gallery, and Timeline views, with per-card sync and dynamic button links. * **Published card content** — published sites now render card-editor content. * **Resizable columns** — free-count resizable columns from the command menu. * **Dynamic button links** — restricted to URL/email/phone columns with an auto scheme. **Improved** * Editor menus default to non-modal to stop node-view flicker. * Copy and send carry an embedded table's views and card content across projects. * Google Maps moved to the async loader with dark-mode support. **Fixed** * Card spacing now matches the editor exactly, with no height jump. * Clipboard copy/paste round-trips nodes via `data-*` attributes. * Signature values show again in published and exported HTML. **2026-07-02** **New** * **Rich, collaborative cards** — database cards across Board, Gallery, List, and Timeline views gain an editable body with live field chips, a slash menu, a bubble menu, tabs, titles, and rich notes — edited collaboratively through a shared per-table document. * **Card content travels** — sending a document carries embedded views and their card content to the recipient. **Improved** * Field rows read inline as "Column: value", empty rows are skipped, and autocomplete offers every column and value. * View settings moved onto the tabs row; table top-bar controls reveal on hover instead of filling the whole view. **2026-06-24** **New** * **Database views** — turn any table into a **Board** (kanban), **Gallery**, **List**, **Calendar**, **Timeline**, **Map**, or **Chart**, each with its own config; switch, add, rename, duplicate, and delete views per table. * **Filters** — a visual filter builder with per-view persistence, powered by a new filter engine (formula columns filterable by value and unit). * **Image columns** — upload, paste, and reorder images directly in cells, and use an image column as a Gallery card cover. **Improved** * Rich drag-and-drop across Board and Calendar (overlays, drop targets, reschedule); click a card to open its row sheet. * List view renders as a numbered list and is text-selectable. **2026-06-17** **New** * **Icon blocks** — insert and style icons anywhere, with a picker, editable size (slider + px field that scales with the editor font), and DOCX export. * **Button blocks** — primary, secondary, and ghost buttons with an anchored settings popover (type/icon/position/alignment) and a slash command. * **Reworked dashboard** — sortable, resizable document covers with hover previews, a right-click context menu (rename/copy/open/delete), a New split-button with Import, and keyboard shortcuts throughout. **Improved** * Space previews a folder or project as a cover dialog; per-row metadata appears on hover. * AI `readDocumentText` now includes buttons. **2026-05-06** Initial public release of the HERO API and developer portal. Coverage: * Documents, projects, blocks, tables, workspaces, organizations * Media, upload, export, TTS, snapshots, published artifacts * AI agents (chat + streaming) and MCP tool catalog * Realtime collaboration # Demos Source: https://developers.myhero.so/demos End-to-end walkthroughs for the most common HERO integrations. Practical, copy-pasteable examples.\ Each demo assumes you have an API key (`hero_ak_*`) — see [Working with the API](./working-with-the-api) if you don't. ```bash theme={null} export HERO_API_KEY=hero_ak_your_key_here ``` ## 1. Fetch your default workspace The simplest possible call — verifies your key is wired up correctly and returns the workspace your account lands on by default. ```bash cURL theme={null} curl https://app.myhero.so/api/workspace/default \ -H "Authorization: Bearer $HERO_API_KEY" ``` ```ts Node.js theme={null} const res = await fetch("https://app.myhero.so/api/workspace/default", { headers: { Authorization: `Bearer ${process.env.HERO_API_KEY}` }, }); console.log(await res.json()); ``` ```python Python theme={null} import os, requests r = requests.get( "https://app.myhero.so/api/workspace/default", headers={"Authorization": f"Bearer {os.environ['HERO_API_KEY']}"}, ) print(r.json()) ``` If you get a **401**, the key is wrong or expired. \ If you get a **403** with `WorkspaceScopeViolation`, the key is workspace-scoped and the default workspace isn't in its scope — pass an explicit `workspaceId` to a scoped endpoint instead. ## 2. Create a document programmatically Two calls: list your projects, then create a document inside one. **1. List your projects** ```bash theme={null} curl https://app.myhero.so/api/project/all/$WORKSPACE_ID \ -H "Authorization: Bearer $HERO_API_KEY" ``` Pick the `_id` of the project you want to write into. **2. Create the document** ```bash theme={null} curl -X POST https://app.myhero.so/api/document \ -H "Authorization: Bearer $HERO_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "projectId": "", "name": "My new doc", "type": "FILE" }' ``` Returns `{ "data": { "_id": "...", "name": "My new doc", ... } }`. Open it in the HERO app at `app.myhero.so///editor`. ## 3. Stream an AI agent (and watch it use tools) `POST /api/ai-agent/stream` runs HERO's general agent and emits Server-Sent Events as it thinks, calls tools, and edits your workspace. You see the model's reply stream in token-by-token, get notified every time it invokes a tool ([`create-document`](./mcp/tools/project-tree/create-document), [`add-row`](./mcp/tools/tables-data/add-row), [`search-web`](./mcp/tools/web/search-web), and 50+ others), and at the end receive a **change summary** of every entity it touched — undoable in one shot if the user changes their mind. The five event types over `text/event-stream`: | `type` | `data` | | - | - | | `delta` | `{ content: string }` — incremental token output | | `tool_call` | provider-specific payload — agent is invoking a tool | | `tool_result` | provider-specific payload — tool returned | | `done` | `{ finalContent, usage, sessionId, hasUndo, changes? }` | | `error` | `{ message: string }` | ### Quick peek with cURL `-N` disables curl's buffering so you see the chunks land in real time. ```bash theme={null} curl -N -X POST https://app.myhero.so/api/ai-agent/stream \ -H "Authorization: Bearer $HERO_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "chatMessages": [ { "type": "user", "text": "Create a document called Sprint 14 retro in my Engineering project, then add an H1 \"What went well\" and three bullet points." } ], "context": { "workspaceId": "", "projectId": "" } }' ``` You'll see a flurry of `data: {"type":"delta",...}` lines as the agent narrates what it's about to do, then `data: {"type":"tool_call",...}` as it invokes [`create-document`](./mcp/tools/project-tree/create-document) and [`write-document-markdown`](./mcp/tools/editor/write-document-markdown), then a final `data: {"type":"done",...}` with the change summary. ### Full Node.js client — parse, react, capture ```ts theme={null} const res = await fetch("https://app.myhero.so/api/ai-agent/stream", { method: "POST", headers: { Authorization: `Bearer ${process.env.HERO_API_KEY}`, "Content-Type": "application/json", Accept: "text/event-stream", }, body: JSON.stringify({ chatMessages: [ { type: "user", text: "Summarise my contracts table and add the summary as a new doc in the Legal project." }, ], context: { workspaceId: process.env.HERO_WORKSPACE_ID }, }), }); if (!res.ok || !res.body) throw new Error(`Stream failed: ${res.status}`); const reader = res.body.getReader(); const decoder = new TextDecoder(); let buffer = ""; let sessionId: string | undefined; while (true) { const { value, done } = await reader.read(); if (done) break; buffer += decoder.decode(value, { stream: true }); // SSE frames are separated by a blank line. const frames = buffer.split("\n\n"); buffer = frames.pop() ?? ""; for (const frame of frames) { const line = frame.split("\n").find((l) => l.startsWith("data: ")); if (!line) continue; const event = JSON.parse(line.slice(6)); switch (event.type) { case "delta": process.stdout.write(event.data.content); break; case "tool_call": console.log(`\n→ tool: ${event.data?.name ?? "(unknown)"}`); break; case "tool_result": // optional: log a short preview of the result break; case "done": sessionId = event.data.sessionId; console.log(`\n\n✓ run complete (session ${sessionId})`); if (event.data.hasUndo) { console.log( ` changed ${event.data.changes?.length ?? 0} entities — undoable via POST /api/ai-agent/undo with { sessionId }`, ); } break; case "error": console.error(`\n✗ ${event.data.message}`); break; } } } ``` ### Undo a run If the agent did something unwanted, ship the `sessionId` from the `done` event back: ```bash theme={null} curl -X POST https://app.myhero.so/api/ai-agent/undo \ -H "Authorization: Bearer $HERO_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "sessionId": "" }' ``` Every entity the agent touched (documents, tables, projects) is rolled back to the snapshot it took before the run. ### Lighter alternatives * For a single-prompt rewrite (no tool use, no streaming), use [`POST /ai-agent/transform-text`](./api-reference/ai/ai-transform-text) with one of the built-in operations (`rephrase`, `fixGrammar`, `simplify`, `translate`, `shorten`, `summarize`, etc.). * For an agentic run where you don't need incremental output, use [`POST /ai-agent`](./api-reference/ai/ai-chat) — same body shape, returns the full `chatMessages` array in one response. * For an interactive widget — a calculator, dashboard, slide deck, prototype or game — use [`POST /ai-agent/generate-html`](./api-reference/ai/ai-generate-html-block). It streams the HTML as it is written and ends with one `done` event holding the finished document, styled with HERO's design system; pass `mentions` (documents, folders, tables…) and `attachments` to build from your own content: ```bash theme={null} curl -N -X POST https://app.myhero.so/api/ai-agent/generate-html \ -H "Authorization: Bearer $HERO_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "prompt": "An exercise-cost calculator for this stock option", "mentions": [{ "type": "table", "id": "", "name": "Grants" }] }' ``` ## 4. Drive HERO from your AI client The MCP path. After [installing for your client](./mcp/overview), try prompts like these in Cursor, Claude Desktop, or Claude Code — the AI will route them to the right HERO tools automatically. ```text theme={null} "List my workspaces and tell me which has the most projects." ``` ```text theme={null} "Create a new document called 'Sprint 14 retro' in my Engineering project, then add an H1 heading 'What went well' and a bulleted list with three items." ``` ```text theme={null} "Search my documents for any contracts that mention NDA, and summarise the renewal dates." ``` The MCP server exposes 100+ tools across documents, tables, projects, signing, comments, versions and automations — browse the full [Tool catalog](./mcp/tools). ## 5. Receive a webhook Subscribe to events ([Webhooks](./webhooks)) and accept POSTs at your endpoint. ```ts Node.js / Express theme={null} import express from "express"; const app = express(); app.post("/hero-webhook", express.json(), (req, res) => { const { event, data } = req.body; console.log(`[${event}]`, data); // ... your handling res.sendStatus(200); }); app.listen(3000); ``` Verify the signature header before trusting the payload — see [Webhooks](./webhooks) for the signing scheme. # Errors Source: https://developers.myhero.so/errors HERO REST API error response shape and status codes — a JSON envelope with error, message, and details fields, listed by HTTP status. All errors return JSON in this shape: ```json theme={null} { "error": "ValidationError", "message": "Request failed schema validation", "details": [...] } ``` ## Status codes ### 400 * 400 response * Invalid request (missing prompt, too many mentions or attachments, `currentHtml` too long). * Mcp-Session-Id header missing. * Missing or invalid request. * Validation error * sessionId query param missing. ### 401 * 401 response * Not signed in. * OAuth token missing or invalid. ### 403 * 403 response * Attachments without a plan that includes them. * Missing, invalid or expired token * Session belongs to a different user. ### 404 * 404 response * No active session for the given session ID. * Not found * Unknown client identifier. ### 409 * 409 response ### 410 * 410 response ### 413 * 413 response ### 415 * 415 response ### 422 * 422 response ### 429 * 429 response * AI usage limit reached, or the plan has no AI. * Rate limited ### 500 * 500 response ### 502 * 502 response ### 503 * Extension not yet built on this server. # Overview Source: https://developers.myhero.so/introduction Build with documents, projects, tables, and AI. HERO is a collaborative document platform with built-in AI agents and native [Model Context Protocol](mcp/overview) integration. ## What you can build * **Document automation** — programmatically create, update, and organise documents. * **AI workflows** — invoke HERO's specialised agents from your own product. * **MCP integrations** — let any MCP-compatible AI tool work with HERO content. * **Realtime collaboration** — connect to realtime document states and work with others. ## Get started in 3 steps Pick the path that matches how you're integrating. > [tab] REST API > > For calling HERO REST API directly from your own code or provider. > > **1. Generate an API key** > > Sign in at [HERO](https://app.myhero.so), open **[Settings](https://app.myhero.so/settings/account)**, and click **Generate new API key**. \\ > > Copy the `hero_ak_*` key — it's shown once. > > See [Authentication](./authentication) for the full walkthrough. > > **2. Make your first request** > > Get the default user workspace to confirm auth works: > > ```bash theme={null} > curl https://app.myhero.so/api/workspace/default \ > -H "Authorization: Bearer hero_ak_" > ``` > > See [Working with the API](./working-with-the-api) for conventions. > > **3. Browse the reference** > > Every public endpoint is documented in the [API reference](./api-reference). > [tab] MCP (AI tools) > > For connecting Cursor, VS Code, Claude or any MCP-compatible AI client to HERO MCP. > > **1. Install for your client** > > One-click installers for Cursor, VS Code, and Claude Desktop are listed on [Connect HERO to your AI tool](./mcp/overview). \\ > > For other clients, the same page has a manual JSON config snippet. > > **2. Generate an MCP access token** > > Open **[MCP Settings](https://app.myhero.so/settings/mcp-tokens)** and click **Generate New Token**. \\ > > Copy the `hero_at_*` token and paste it into your client's config. > > See [MCP authentication](./mcp/authentication) for safety guidelines and the OAuth alternative when supported by your client. > > **3. Try it from your AI client** > > Ask your client something like *"list my workspaces"* to test. \\ > > The MCP server exposes 100+ tools across documents, tables, projects, signing, comments, versions and automations. > > Browse the full [Tool catalog](./mcp/tools). > [!WARNING] > > An API/MCP access token acts as you — anyone holding it has the same access to your account, workspaces, and documents that you do. Treat it like a password. > > * **Never commit** a token to git or paste it into chat, screenshots, issue trackers, or logs. > * **Never embed** a token in client-side code or anything served to a browser. > * **Never share** a token with another person or paste it into untrusted MCP clients. > * If a token is exposed, revoke it immediately from [Account Settings](https://app.myhero.so/settings/account) and generate a new one. ## Need help? File us an email at [hello@myhero.so](mailto:hello@myhero.so) or join the community **[Discord](https://discord.gg/qt6mnvkzfM)**. # MCP Authentication Source: https://developers.myhero.so/mcp/authentication Authenticate MCP clients with a personal access token or via OAuth. MCP clients authenticate to HERO with either a **personal access token** (works everywhere) or **OAuth** (when supported by your client). Pick the tab that matches your setup. > [tab] Personal access token > > Works with every stdio MCP client. Paste the token into your client's config. > > **1. Open MCP Settings** > > Sign in at [HERO](https://app.myhero.so) and go to **[MCP Settings](https://app.myhero.so/#/settings/mcp-tokens "https://app.myhero.so/#/settings/mcp-tokens")**. > > **2. Generate a token** > > Click **Generate New Token**. Copy the `hero_at_*` value — it's shown once. > > **3. Paste into your client's config** > > Stdio MCP clients receive the token via the `HERO_API_KEY` environment variable in their server entry: > > ```json theme={null} > { > "mcpServers": { > "hero": { > "command": "npx", > "args": ["-y", "@myhero/mcp-server"], > "env": { "HERO_API_KEY": "hero_at_..." } > } > } > } > ``` > > Or set `HERO_API_KEY` in your shell/application environment directly. > [tab] OAuth > > Skip the manual token — `@myhero/mcp-server` signs you in automatically the first time it needs credentials. No paste, no rotate, no shell setup. If `HERO_API_KEY` is not set, the OAuth flow triggers on the next tool call. > > **1. Browser opens automatically** > > The MCP server starts a short-lived listener on a free localhost port and launches your default browser at HERO's sign-in page. \\ > > You don't run anything yourself. > > **2. Sign in and approve** > > Sign in to HERO if you aren't already, then approve access for the `hero-mcp` client. > > **3. Close the tab** > > HERO redirects back to the localhost listener and the page shows **"Login successful! You can close this tab."** That's the whole user-facing flow. > > **4. Done — credentials saved** > > The MCP server exchanges the authorization code for an access token (PKCE), writes it to `~/.hero/credentials.json` with mode `0600`, and refreshes automatically before expiry. \\ > > You won't be prompted again unless the refresh token is revoked or you delete that file. > > The server hits HERO's standard OAuth endpoints under the hood — included for transparency, you don't call them directly: > > | Endpoint | URL | > | - | - | > | Authorization URL | `https://app.myhero.so/oauth/authorize` | > | Token URL | `https://app.myhero.so/oauth/token` | # Connect HERO to your AI tool Source: https://developers.myhero.so/mcp/overview Connect Cursor, VS Code, Claude Desktop, and other MCP clients to HERO. Install links, manual config, and the remote MCP endpoint. HERO supports the **Model Context Protocol (MCP)** — an open standard that lets AI tools read and write your documents, projects, and tables. ## Install for your client * **Cursor** — [Install](cursor://anysphere.cursor-deeplink/mcp/install?name=hero\&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBteWhlcm8vbWNwLXNlcnZlciJdfQ%3D%3D) * **VS Code** — [Install](vscode:mcp/install?%7B%22name%22%3A%22hero%22%2C%22type%22%3A%22stdio%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40myhero%2Fmcp-server%22%5D%7D) * **Claude Desktop** — [Install](https://app.myhero.so/api/mcp/install/claude-desktop) * **NPM package** — [View](https://www.npmjs.com/package/@myhero/mcp-server) ## Authentication methods * **Personal access token** — paste a token into the client's config. \ See [Personal access tokens](./authentication#personal-access-token). * **OAuth login** — for clients that support remote MCP OAuth discovery. \ See [OAuth flow](./authentication#oauth). ## Manual config If your MCP client isn't listed above, paste this into its config file. Replace `hero_at_...` with a personal access token from [here](https://app.myhero.so/#/settings/mcp-tokens "https://app.myhero.so/#/settings/mcp-tokens"). ```json theme={null} { "mcpServers": { "hero": { "command": "npx", "args": ["-y", "@myhero/mcp-server"], "env": { "HERO_API_KEY": "hero_at_..." } } } } ``` For Claude Code (CLI): ```bash theme={null} claude mcp add hero -- npx -y @myhero/mcp-server ``` For any other stdio MCP client: ```bash theme={null} npx -y @myhero/mcp-server ``` ## Remote MCP endpoint Clients that support remote MCP OAuth discovery can connect directly to: * **Server**: `https://app.myhero.so/api/mcp/` * **OAuth metadata**: `https://app.myhero.so/.well-known/oauth-authorization-server` # Create automation Source: https://developers.myhero.so/mcp/tools/automations/create-automation Set up an automation in a project, from a plain-English description of what starts it (a row added to or changed in a table, a schedule, an email… `create_automation` Set up an automation in a project, from a plain-English description of what starts it (a row added to or changed in a table, a schedule, an email arriving, a button) and what it then does (fill in cells, draft or copy documents, run AI, send a notification or email, call a webhook). Describe the whole thing as the user asked it, naming tables and documents as they are named in HERO. It is saved switched off unless the user asked for it on: tell them what it does and how to switch it on. In HERO's chat, one that emails people or sends data outside HERO is switched on only by the user's click on a card. A caveat in the result is a part it could not build. ## Parameters **projectId** `string` *required* The project it belongs to and works in. **request** `string` *required* What to automate: what starts it, any condition, and every step. **enabled** `boolean` true only when the user asked for it to run straight away. # Delete automation Source: https://developers.myhero.so/mcp/tools/automations/delete-automation Delete one of the user's own automations. Only when the user asks for it gone; to stop it running, switch it off with update_automation instead. `delete_automation` Delete one of the user's own automations. Only when the user asks for it gone; to stop it running, switch it off with update\_automation instead. ## Parameters **automationId** `string` *required* # List automation runs Source: https://developers.myhero.so/mcp/tools/automations/list-automation-runs How one of the user's own automations' recent runs went, newest first: status, when, the summary, and the error of any step that failed. For "did it run?"… `list_automation_runs` How one of the user's own automations' recent runs went, newest first: status, when, the summary, and the error of any step that failed. For "did it run?" or "why did it fail?". ## Parameters **automationId** `string` *required* **limit** `number` How many runs (default 10, at most 50). # List automations Source: https://developers.myhero.so/mcp/tools/automations/list-automations The user's own automations in a project (the ones that run as them): what starts each, its steps, whether it is on, and how its last run went. `list_automations` The user's own automations in a project (the ones that run as them): what starts each, its steps, whether it is on, and how its last run went. ## Parameters **projectId** `string` *required* # Update automation Source: https://developers.myhero.so/mcp/tools/automations/update-automation Change one of the user's own automations: switch it on or off, rename it, turn its run notifications on or off, or rebuild what it does from a new… `update_automation` Change one of the user's own automations: switch it on or off, rename it, turn its run notifications on or off, or rebuild what it does from a new plain-English request. Pass only what changes. In HERO's chat, switching on one that emails people or sends data outside HERO waits for the user's click on a card. ## Parameters **automationId** `string` *required* **enabled** `boolean` **name** `string` **request** `string` The whole automation as it should be from now on: what starts it, any condition, every step. **notifyInApp** `boolean` Tell the user in HERO when a run finishes. **notifyEmail** `boolean` Email the user when a run finishes. # Add comment Source: https://developers.myhero.so/mcp/tools/comments/add-comment Comment on a passage of a HERO document, as the user: it appears in the comment panel under their name, highlighted on the passage. Quote the passage in… `add_comment` Comment on a passage of a HERO document, as the user: it appears in the comment panel under their name, highlighted on the passage. Quote the passage in `passage` exactly as the document has it (within one block). When it appears in more than one block, also pass that block's blockId (list\_document\_blocks); a blockId alone comments on the whole block. For a Word file use docx\_comment. ## Parameters **documentId** `string` *required* The HERO document. **passage** `string` The text to comment on, quoted from the document. **blockId** `string` The block the passage is in, or the block to comment on. **comment** `string` *required* What the comment says. # List comments Source: https://developers.myhero.so/mcp/tools/comments/list-comments Read a document's comments as the editor's comment panel shows them: for each thread, the passage it is on (on, in block blockId) and its comments by… `list_comments` Read a document's comments as the editor's comment panel shows them: for each thread, the passage it is on (`on`, in block `blockId`) and its comments by date, with author, text and reactions; a deleted comment keeps its place as `deleted`, without its text, as the panel shows it. `you` marks comments posted as the user, yours included. A `detached` thread has lost its passage and is hidden in the editor. Resolved threads are left out unless includeResolved. For a Word file use docx\_comment. ## Parameters **documentId** `string` *required* The HERO document. **includeResolved** `boolean` Also list resolved threads. **offset** `integer` Where to start. Pass the previous result's page.nextOffset. Minimum: 0. **limit** `integer` How many to return at most; the result may hold fewer to fit. Minimum: 1. # React to comment Source: https://developers.myhero.so/mcp/tools/comments/react-to-comment React to a comment as the user, as the reaction button in the comment panel does. emoji is an icon name from HERO's icon picker, e.g. ThumbsUp, Check… `react_to_comment` React to a comment as the user, as the reaction button in the comment panel does. `emoji` is an icon name from HERO's icon picker, e.g. ThumbsUp, Check, CircleCheck, Heart, Star, Sparkles, Flag, TriangleAlert, Eye, Lightbulb, Trophy, Handshake, CircleX; a common emoji works too. Reacts to the thread's opening comment unless commentId names another; remove: true takes the user's reaction away. A resolved thread takes reactions too. ## Parameters **documentId** `string` *required* The HERO document. **threadId** `string` *required* The comment thread, from list\_comments. **commentId** `string` A comment in the thread, from list\_comments. **emoji** `string` *required* An icon name, e.g. ThumbsUp, Check, CircleCheck, Heart, Star, Sparkles, Flag, TriangleAlert, Eye, Lightbulb, Trophy, Handshake, CircleX. **remove** `boolean` Take the reaction away instead. # Reply to comment Source: https://developers.myhero.so/mcp/tools/comments/reply-to-comment Reply to a comment thread, as the user. A resolved thread takes no replies, as in the editor: reopen it first with resolve_comment. `reply_to_comment` Reply to a comment thread, as the user. A resolved thread takes no replies, as in the editor: reopen it first with resolve\_comment. ## Parameters **documentId** `string` *required* The HERO document. **threadId** `string` *required* The comment thread, from list\_comments. **comment** `string` *required* The reply. # Resolve comment Source: https://developers.myhero.so/mcp/tools/comments/resolve-comment Resolve a comment thread, or reopen a resolved one with resolved: false. `resolve_comment` Resolve a comment thread, or reopen a resolved one with resolved: false. ## Parameters **documentId** `string` *required* The HERO document. **threadId** `string` *required* The comment thread, from list\_comments. **resolved** `boolean` false reopens the thread. Default true. # Get document settings Source: https://developers.myhero.so/mcp/tools/document-settings/get-document-settings A document's settings, as its Document settings dialog shows them: numbering style, whether a missing clause level is filled in, whether a sub-clause… `get_document_settings` A document's settings, as its Document settings dialog shows them: numbering style, whether a missing clause level is filled in, whether a sub-clause alone under its clause shows its number, its reference, and the document it imports defined terms from. termSources lists the project's documents it can import terms from, the one defining the most first. Change them with update\_document\_settings. ## Parameters **documentId** `string` The document. Falls back to context documentId if omitted. # Update document settings Source: https://developers.myhero.so/mcp/tools/document-settings/update-document-settings Change a HERO document's settings, as its Document settings dialog does; pass only what changes. Change the numbering style or the clause switches only… `update_document_settings` Change a HERO document's settings, as its Document settings dialog does; pass only what changes. Change the numbering style or the clause switches only when the user asks. importTermsFrom: a document made under another (a statement of work, schedule, order form or amendment) imports that agreement's defined terms instead of defining them again, and the editor highlights them in it; get\_document\_settings lists the documents it can import from. The reference is set with update\_documents\_meta\_batch. undo\_last\_change puts the settings back. ## Parameters **documentId** `string` The document. Falls back to context documentId if omitted. **numberingStyle** `string, enum: 'STYLE_ONE' | 'STYLE_FIVE' | 'STYLE_THREE' | 'STYLE_FOUR' | 'STYLE_TWO' | 'STYLE_SEVEN' | 'STYLE_EIGHT' | 'STYLE_SIX'` Clause numbering, the dialog's Hierarchy Style: STYLE\_ONE Decimal (1. · 1.1 · (a)); STYLE\_FIVE Decimal, capital letters (1. · 1.1 · A.); STYLE\_THREE Numbered paragraphs (1. · (a) · (i)); STYLE\_FOUR Roman outline (I. · 1. · (a)); STYLE\_TWO Article & Section, roman (ARTICLE I. · Section I.01 · (a)); STYLE\_SEVEN Article & Section, decimal (ARTICLE I. · Section 1.1 · 1.1.1); STYLE\_EIGHT Article & Section, lettered (Article I · Section 1.1. · (a)); STYLE\_SIX Article, decimal (ARTICLE 1 · 1.1 · 1.1.1). A Word import's own numbering ("as imported") is not among them: a style replaces it, and only undo brings it back. **insertMissingLevels** `boolean` Fill a missing clause level in with an empty clause. On unless turned off. **hideLoneClauseNumbers** `boolean` Show no number on a sub-clause alone under its clause. On unless turned off. **importTermsFrom** `string` The documentId whose defined terms this document uses: a HERO document in the same project that defines terms. "" stops importing them. # Append markdown to document Source: https://developers.myhero.so/mcp/tools/editor/append-markdown-to-document Append content to the END of an existing document. Existing content is PRESERVED — new content is added after it. Use when the user asks to ADD, INSERT… `append_markdown_to_document` Append content to the END of an existing document. Existing content is PRESERVED — new content is added after it. Use when the user asks to ADD, INSERT, or EXTEND a document (NOT rewrite it). Same extended Markdown syntax as write\_document\_markdown — call `get_hero_writing_guide` for it. Prose cross-references ("Section 2") are linked automatically across the whole document. Lines whose markup could not be read come back as `unparsedSyntax`; fix those with patch\_document. Comments stay on their text; one whose text the edit removed comes back in `detachedComments`: tell the user. Otherwise the result confirms the write: do not read the document back to check it. ## Parameters **documentId** `string` *required* ID of the document to append to. **markdown** `string` *required* Content to append, in extended Markdown. # Create document snapshot Source: https://developers.myhero.so/mcp/tools/editor/create-document-snapshot Create a named version/snapshot of a document's current state before making significant edits. Use this before large rewrites or restructures of documents… `create_document_snapshot` Create a named version/snapshot of a document's current state before making significant edits. Use this before large rewrites or restructures of documents OTHER than the user's active document. The snapshot appears in the document's version history and can be restored by the user. ## Parameters **documentId** `string` *required* ID of the document to snapshot. **name** `string` *required* Descriptive name for this version (e.g. 'Before AI restructure'). # List document blocks Source: https://developers.myhero.so/mcp/tools/editor/list-document-blocks WHEN TO USE: Before calling patch_document to get block IDs. List the blocks in a document (nested ones included, in document order) with their blockId… `list_document_blocks` WHEN TO USE: Before calling patch\_document to get block IDs. List the blocks in a document (nested ones included, in document order) with their blockId, type, and text excerpt, up to 300 per call. Use this to identify blocks before patching. Much more token-efficient than read\_document\_content for editing workflows. `totalBlocks` counts every block; when page.nextOffset is present, more remain — pass page.nextOffset as `offset` to continue. ## Parameters **documentId** `string` *required* ID of the document to list blocks for. **offset** `integer` Where to start. Pass the previous result's page.nextOffset. Minimum: 0. **limit** `integer` How many to return at most; the result may hold fewer to fit. Minimum: 1. # Patch document Source: https://developers.myhero.so/mcp/tools/editor/patch-document Surgically edit a document by applying block-level operations. Each operation targets a specific block by its blockId (use list_document_blocks to find… `patch_document` Surgically edit a document by applying block-level operations. Each operation targets a specific block by its blockId (use list\_document\_blocks to find IDs first). Operations: replace, insertBefore, insertAfter, delete. Applied in order; partial success possible. Markdown field uses the same extended syntax as write\_document\_markdown — see `get_hero_writing_guide`. A block you replace keeps its placeholders, terms and references only if your markdown carries them: read\_document\_text shows each as the markup to copy (\{\{placeholder:ID}}, \{\{term:Word}}, \{\{clauseRef:ID}}). Cross-references in the markdown you supply ("Section 2") are linked automatically; blocks you did not touch are left alone. Deleting a clause that other text points at is reported as `brokenClauseReferences` — those references now read "Not found" and need the pointing text fixed. Lines whose markup could not be read come back as `unparsedSyntax`; fix those with patch\_document. Comments stay on their text; one whose text the edit removed comes back in `detachedComments`: tell the user. Otherwise the result confirms the write: do not read the document back to check it. ## Parameters **documentId** `string` *required* ID of the document to patch. **operations** `array\` *required* Array of patch operations to apply in order. # Read document content Source: https://developers.myhero.so/mcp/tools/editor/read-document-content Read a document's raw TipTap JSON, for when you need node attributes; to read what a document says, use read_document_text. Reads the document's content… `read_document_content` Read a document's raw TipTap JSON, for when you need node attributes; to read what a document says, use read\_document\_text. Reads the document's content as TipTap JSON by connecting to the live collaboration server. Returns `content` (a doc node whose `content` holds this page of top-level blocks, with node types, attributes, marks, and text), `totalBlocks` (top-level blocks in the whole document) and `page`. Up to 100 top-level blocks per call, fewer when they are large; when page.nextOffset is present, more remains — pass page.nextOffset as `offset` to continue. Read only what you need: pass `blockIds` (from list\_document\_blocks) to get just those blocks and everything inside them, or read\_document\_text with a section for one clause. HTML blocks come back with their title only; pass includeHtml: true to get each one's full HTML in attrs.html. ## Parameters **documentId** `string` *required* ID of the document to read. **includeHtml** `boolean` Also return each HTML block's full HTML document in attrs.html (up to 512 KB each). Only when you need to change a widget. **blockIds** `array\` Read only these blocks (attrs.id, at any depth), each with its whole subtree, in document order. offset/limit then page through the matches. Ids not found come back in missingBlockIds. **offset** `integer` Block to start at. Pass the previous result's page.nextOffset. Minimum: 0. **limit** `integer` Max blocks to return (default 100); fewer when blocks are large. Minimum: 1. # Write document markdown Source: https://developers.myhero.so/mcp/tools/editor/write-document-markdown ⚠️ REPLACES ALL existing content with new Markdown-based content. To ADD content to an existing document, use append_markdown_to_document instead… `write_document_markdown` ⚠️ REPLACES ALL existing content with new Markdown-based content. To ADD content to an existing document, use append\_markdown\_to\_document instead. Converts extended Markdown to TipTap JSON server-side — supports ALL HERO node types (headings, @clause, @title, @signature, callouts, columns, tabs, tables, inline atoms, charts, etc.). Call `get_hero_writing_guide` for the full syntax — an MCP client has no system prompt carrying it, and writing plain Markdown here produces a document with no clauses, terms or placeholders in it. Cross-references to this document's clauses written as prose ("Section 2", "Clauses 4.1(a) and (b)") are linked to their clause automatically. Any left as text come back as `unlinkedCrossReferences`: a number no clause has, or a clause of another document, which needs create\_clause\_reference. Lines whose markup could not be read come back as `unparsedSyntax`; fix those with patch\_document. Comments stay on their text; one whose text the edit removed comes back in `detachedComments`: tell the user. Otherwise the result confirms the write: do not read the document back to check it. ## Parameters **documentId** `string` *required* ID of the document to write. **markdown** `string` *required* Full document content in extended Markdown — see `get_hero_writing_guide` for the syntax. # Create media document Source: https://developers.myhero.so/mcp/tools/files/create-media-document Upload an image, video or audio file into HERO and create a document containing it. The new document is named after the media and its entire content is a… `create_media_document` Upload an image, video or audio file into HERO and create a document containing it. The new document is named after the media and its entire content is a single media block already pointing at the uploaded file — nothing for the user to drag in afterwards. Provide the file in exactly one of three ways: - `attachmentFilename` — the user attached the file to this message. ALWAYS use this when they did; you cannot reproduce an attachment's bytes yourself, but the server still holds them. - `sourceUrl` — a public http(s) URL the server downloads. The only option for anything over \~600KB, and therefore for essentially all video and audio. - `base64` — small files you genuinely hold as bytes. Supported: PNG, JPEG, GIF, WebP / MP4, WebM, MOV / MP3, WAV, M4A, OGG, AAC. ## Parameters **name** `string` *required* Name for the new document. Name it after the media, e.g. 'Framed Mixed-Media Fresco'. **attachmentFilename** `string` Filename of a file the user attached to this message, e.g. 'IMG\_6934.jpeg'. Use this whenever the media came from an attachment. **sourceUrl** `string` Public http(s) URL of the file. The server downloads it. Preferred over base64. **base64** `string` Base64-encoded file bytes, for small files only (max \~600KB decoded). Use sourceUrl for anything larger. **mimeType** `string` Optional MIME type override, e.g. 'image/png', 'video/mp4', 'audio/mpeg'. Detected from the file's own bytes when omitted; supply it if detection fails. **caption** `string` Optional caption shown beneath the media. **projectId** `string` Project to create the document in. **parentId** `string` Parent folder ID. Omit for the project root. # Create pdf document Source: https://developers.myhero.so/mcp/tools/files/create-pdf-document Create a NEW PDF document in a HERO project — a real, paginated PDF file that opens in HERO's PDF viewer and downloads as .pdf. Two modes (exactly one): … `create_pdf_document` Create a NEW PDF document in a HERO project — a real, paginated PDF file that opens in HERO's PDF viewer and downloads as .pdf. Two modes (exactly one): - `markdown` — render content you compose. Accepts the same HERO extended markdown as write\_document\_markdown (headings, @clause numbering, lists, tables, blockquotes, bold/italic, links, signature lines). A PDF is static: write the FINAL text with real values — no \{\{placeholder:...}} atoms or \[BRACKETS]. Gather the facts first from the project (list\_project\_documents, read\_document\_text, get\_table\_data / lookup\_table\_cells). - `sourceDocumentId` — render an existing HERO document (or convert a Word document) as it currently stands; clause numbering, tables and placeholder values are filled in from the project. Use this for 'export / save / turn X into a PDF'. Defaults to the source document's project and folder. Put the PDF where it belongs: the project (and folder via parentId) the user named or the conversation is about; ask if it is ambiguous. Only use this when the user wants a PDF — for normal drafting create native HERO documents (create\_document + write\_document\_markdown). To bring in an EXISTING file, use import\_file. Each call makes a new PDF: to redo one you made earlier in this conversation (longer, corrected), pass it as `replaces`. ## Parameters **title** `string` Document name in HERO and the PDF's title metadata. Not drawn on the page — put a heading in the markdown for that. Defaults to the first heading, or the source document's name. **markdown** `string` Full PDF content as HERO extended markdown. Mutually exclusive with sourceDocumentId. **sourceDocumentId** `string` Existing HERO editor or Word document to render as a PDF. Mutually exclusive with markdown. **pageSize** `string, enum: 'letter' | 'a4'` Paper size. Default 'letter'; use 'a4' outside the US/Canada or when the user asks. **fontFamily** `string, enum: 'sans' | 'serif'` Typeface. Default 'sans'; 'serif' suits formal legal documents. **projectId** `string` Project to create the PDF in. **parentId** `string` Folder (or document) to file it under. Omit for the project root. **replaces** `string` documentId of a PDF you created earlier in this conversation that this one supersedes. The new PDF takes its place, and the old one goes to the trash (undo brings it back). # Create upload url Source: https://developers.myhero.so/mcp/tools/files/create-upload-url Get a one-time URL to hand HERO a file you hold locally — in your code sandbox (e.g. a file the user uploaded to you, or a PDF/document you generated) or… `create_upload_url` Get a one-time URL to hand HERO a file you hold locally — in your code sandbox (e.g. a file the user uploaded to you, or a PDF/document you generated) or on disk — when it is too large to pass as base64 (anything over \~600KB). Requires that you can make an HTTP request yourself (a shell, code execution with network access, curl). Send the raw bytes with PUT to `uploadUrl` with the returned `headers` (the Authorization bearer token is the slot's secret; `X-Filename: ` keeps the name), then call import\_file with the `uploadId`. Valid for 2 hours, one file, up to 50MB. If the request is blocked by your sandbox's network policy, tell the user the HERO domain must be allowed for outbound requests, or ask for a direct-download link (import\_file sourceUrl) instead. ## Parameters *This tool takes no parameters.* # Import file Source: https://developers.myhero.so/mcp/tools/files/import-file Import an existing file into a HERO project: PDF, Word (.docx), spreadsheets (.xlsx, .csv, .tsv), images (PNG, JPEG, GIF, WebP), video (MP4, WebM, MOV)… `import_file` Import an existing file into a HERO project: PDF, Word (.docx), spreadsheets (.xlsx, .csv, .tsv), images (PNG, JPEG, GIF, WebP), video (MP4, WebM, MOV) and audio (MP3, WAV, M4A, OGG, AAC). Media becomes a document showing it. A spreadsheet becomes a HERO table in the project, one per sheet, its column types read from the data, as the app's table import makes it; read it with get\_table\_data. Tables are not filed in folders: parentId and mode do not apply. A Word file or PDF is kept as it is by default (mode "keep"): it opens in HERO's Word or PDF viewer and keeps round-trips with MS Word; read it with docx\_get\_content / read\_document\_text. mode "convert" makes it an editable HERO document instead, as the app's "Convert to HERO" import does: use it when the user wants to work on it in HERO (a template, placeholders, clause numbering, your edits). If it is unclear which they want, ask. Converting can take a few minutes; a scanned PDF stays a PDF. File it where it belongs: the project the user named or the conversation is about, in the folder of related documents (parentId). If no project was named, resolve it with search\_projects / list\_project\_tree; if more than one could fit, ask the user. Provide the file in exactly ONE way: - `attachmentFilename` — the user attached it to this message in HERO's chat. ALWAYS use this when they did. - `uploadId` — from create\_upload\_url, after PUTting the bytes. The way to hand over a file you hold in a sandbox or on disk (a file the user uploaded to you, or one you generated) — you cannot paste a file's bytes into a tool call. - `sourceUrl` — a public http(s) direct-download URL (not a sharing/preview page). - `base64` — only for small files (\~600KB decoded) whose bytes you genuinely hold. To make a NEW PDF from content instead, use create\_pdf\_document. ## Parameters **name** `string` Name in HERO (a workbook with several sheets names each table after its sheet). Defaults to the file name without its extension. Pass it with base64, which carries no file name, with the extension for a CSV or TSV (e.g. "Claims.csv"). **attachmentFilename** `string` Filename of a file the user attached to this message. **uploadId** `string` uploadId returned by create\_upload\_url, after the file was PUT. **sourceUrl** `string` Public http(s) direct-download URL of the file. **base64** `string` Base64-encoded file bytes, small files only (max \~600KB decoded). **projectId** `string` Project to import the file into. **parentId** `string` Folder (or document) to file it under. Omit for the project root. **mode** `string, enum: 'keep' | 'convert'` (default: keep) Word files and PDFs: "keep" (default) stores the file as it is; "convert" makes an editable HERO document. # Get hero design guide Source: https://developers.myhero.so/mcp/tools/general/get-hero-design-guide Get the HERO document design guide: a pattern library of copy-ready compositions (hero, feature grid, comparison, steps, FAQ, call to action and more)… `get_hero_design_guide` Get the HERO document design guide: a pattern library of copy-ready compositions (hero, feature grid, comparison, steps, FAQ, call to action and more), page archetypes (brief, report, proposal, playbook, FAQ, guide) and the composition rules. Call it once before writing a design-oriented document (a page, report, brief, proposal, guide or playbook), after get\_hero\_writing\_guide, which carries the syntax the patterns are written in. Returns \~430 lines of guidance; call once per session and remember it. ## Parameters *This tool takes no parameters.* # Get hero writing guide Source: https://developers.myhero.so/mcp/tools/general/get-hero-writing-guide Get the complete HERO reference: extended markdown DSL, clause depth rules, placeholder usage, legal writing style, reading and writing table rows and… `get_hero_writing_guide` Get the complete HERO reference: extended markdown DSL, clause depth rules, placeholder usage, legal writing style, reading and writing table rows and cells, and which tool to use for each job. Call it once before you write document content: plain markdown gives a document with no clauses, terms or placeholders. Returns about 700 lines; remember them for the rest of the session. ## Parameters *This tool takes no parameters.* # Get project outline Source: https://developers.myhero.so/mcp/tools/general/get-project-outline A project at a glance, in one call: its tables, each with its columns (name, type, column id, select options, linked table), and its documents with their… `get_project_outline` A project at a glance, in one call: its tables, each with its columns (name, type, column id, select options, linked table), and its documents with their format (editor, docx or pdf). Start here when working in a project, rather than listing its tables and documents one by one; a large project's outline says which listing to page for the rest. ## Parameters **projectId** `string` *required* # Undo last change Source: https://developers.myhero.so/mcp/tools/general/undo-last-change Undo the most recent change YOU (the AI) made to the user's HERO workspace via these tools — document writes/edits, a restored version, comments, table… `undo_last_change` Undo the most recent change YOU (the AI) made to the user's HERO workspace via these tools — document writes/edits, a restored version, comments, table changes, document/folder/project create/rename/move/delete, metadata, document settings, automations, PDF/DOCX edits. Call it again to step further back: each call reverses the next-most-recent change, exactly like pressing undo repeatedly. Use when the user says things like "undo that", "revert the last change", or "go back". The response says what was undone and whether more changes remain to undo (hasMoreUndo). ## Parameters *This tool takes no parameters.* # Tool catalog Source: https://developers.myhero.so/mcp/tools/index Full catalog of 159 HERO AI tools — documents, tables, signing, sharing, comments, versions, automations, files, web, and integrations (Gmail, Drive, Outlook, OneDrive, Dropbox, Notion). HERO's AI has 159 tools, grouped by area below. ## General * [**Get hero writing guide**](./general/get-hero-writing-guide) — `get_hero_writing_guide`\ Get the complete HERO reference: extended markdown DSL, clause depth rules, placeholder usage, legal writing style, reading and writing table rows and cells, and which tool to use for each job. Call it once before you write document content: plain markdown gives a document with no clauses, terms or placeholders. Returns about 700 lines; remember them for the rest of the session. * [**Get hero design guide**](./general/get-hero-design-guide) — `get_hero_design_guide`\ Get the HERO document design guide: a pattern library of copy-ready compositions (hero, feature grid, comparison, steps, FAQ, call to action and more), page archetypes (brief, report, proposal, playbook, FAQ, guide) and the composition rules. Call it once before writing a design-oriented document (a page, report, brief, proposal, guide or playbook), after get\_hero\_writing\_guide, which carries the syntax the patterns are written in. Returns \~430 lines of guidance; call once per session and remember it. * [**Get project outline**](./general/get-project-outline) — `get_project_outline`\ A project at a glance, in one call: its tables, each with its columns (name, type, column id, select options, linked table), and its documents with their format (editor, docx or pdf). Start here when working in a project, rather than listing its tables and documents one by one; a large project's outline says which listing to page for the rest. * [**Undo last change**](./general/undo-last-change) — `undo_last_change`\ Undo the most recent change YOU (the AI) made to the user's HERO workspace via these tools — document writes/edits, a restored version, comments, table changes, document/folder/project create/rename/move/delete, metadata, document settings, automations, PDF/DOCX edits. Call it again to step further back: each call reverses the next-most-recent change, exactly like pressing undo repeatedly. Use when the user says things like "undo that", "revert the last change", or "go back". The response says what was undone and whether more changes remain to undo (hasMoreUndo). ## Knowledge * [**List project documents**](./knowledge/list-project-documents) — `list_project_documents`\ List the documents (files, subfiles, and external PDFs) in a project, sorted by name. Returns `documents` (name, id, type, externalType e.g. 'PDF', and reference e.g. 'Schedule A') and `page`, up to 300 per call. Paged: when the result's page.nextOffset is present, more remains — pass page.nextOffset as `offset` to continue. * [**Get document metadata**](./knowledge/get-document-metadata) — `get_document_metadata`\ Get metadata for a specific document: name, type, description, collaborators, timestamps, parent folder, published status. * [**Build document map**](./knowledge/build-document-map) — `build_document_map`\ Map a document's structure without reading all of it: its clause `sections` (numbering, title, depth, content) and its defined `terms`. Pass `depth` for just the numbers and titles at one level, a table of contents. Sections are paged (up to 100 per call); `terms` come with the first page. Paged: when the result's page.nextOffset is present, more remains — pass page.nextOffset as `offset` to continue. * [**Explain term definition**](./knowledge/explain-term-definition) — `explain_term_definition`\ Explain a defined term (e.g. "Party", "Effective Date") in a specific document. Returns the definition content. * [**Read document text**](./knowledge/read-document-text) — `read_document_text`\ Read a document as plain text: a HERO editor document (with its clause numbering and headings), a PDF (the server extracts its text; it is the only way to read one), or a file attached to this chat message (attachmentFilename). Pass `section` to read one clause and what sits under it instead of the whole document. Returns at most 40000 characters per call with a `page` object (\{offset, returned, total, nextOffset?}). Paged: when the result's page.nextOffset is present, more remains — pass page.nextOffset as `offset` to continue. * [**Get document maps**](./knowledge/get-document-maps) — `get_document_maps`\ Build document maps (sections + terms) for the documents in a project, sorted by name. Useful for cross-document search. Returns `documents` (\{\_id, name, map}) and `page`; maps are built only for the requested page, 10 documents by default (max 50). Paged: when the result's page.nextOffset is present, more remains — pass page.nextOffset as `offset` to continue. To find documents by name, search\_documents or list\_project\_documents is far cheaper. * [**Create clause reference**](./knowledge/create-clause-reference) — `create_clause_reference`\ A live link to a clause in another document, to write as \{\{clauseRef:ID}}. Pass the document that holds the clause and the clause's full number as a reader cites it ("2.2", "4.1(a)"); the result's clauseReferenceId is the ID. It shows only the clause's number, so the sentence names the document: "Section \{\{clauseRef:ID}} of the \{\{doc:DOCUMENT\_ID}}". A clause in the document you are writing needs none: write "Section 2" as prose and it is linked when the document is written. * [**Get table schema**](./knowledge/get-table-schema) — `get_table_schema`\ Get a table's columns by its ID or its name: each column's id, name, type, select option labels, linked table for relations, and which column is the identifier (row label / primary key). ## Project tree * [**List user workspaces**](./project-tree/list-user-workspaces) — `list_user_workspaces`\ List all workspaces the current user has access to. Returns each workspace's id, name, and metadata. Use this when the user asks about their workspaces or when you need a workspaceId for other tools. * [**Search documents**](./project-tree/search-documents) — `search_documents`\ Search for documents and folders by name across all workspaces the user has access to, most recently updated first. Returns matches with full path context (workspace, project, parent folder) AND a `format` field ('editor' | 'docx' | 'pdf' | 'folder') so you can pick the right tool family per document. Use this to find documents by name when the user references them informally without @-mentions. If multiple matches are returned, ask the user to disambiguate using the workspace/project context shown. The result's `page` says how many match; pass page.nextOffset to continue. * [**Search projects**](./project-tree/search-projects) — `search_projects`\ Search for projects by name across all workspaces the user has access to, most recently updated first. Returns each match's \_id, name, description, workspaceId, and workspaceName so you can pick the right one without needing a workspaceId up front. Use it before create\_project when the user names a project, so you reuse a match rather than create a duplicate in the wrong workspace. If multiple matches are returned, ask the user to disambiguate using workspace context. The result's `page` says how many match; pass page.nextOffset to continue. * [**List project tree**](./project-tree/list-project-tree) — `list_project_tree`\ Get a project's document tree: folders and files with their parent-child relationships, depth-first. Returns id, name, type, parentId, createdAt, updatedAt for each node. Pass folderId to list one folder's subtree and depth to limit the levels (1 = direct children only). The result's `page` says how many nodes there are; pass page.nextOffset to continue. * [**List workspace projects**](./project-tree/list-workspace-projects) — `list_workspace_projects`\ List the projects in a workspace with their names, ids, and timestamps, by name. The result's `page` says how many there are; pass page.nextOffset to continue. * [**Create project**](./project-tree/create-project) — `create_project`\ Create a new project in the current workspace. * [**Rename project**](./project-tree/rename-project) — `rename_project`\ Rename an existing project. * [**Delete project**](./project-tree/delete-project) — `delete_project`\ Delete an entire project and all its documents. THIS IS DESTRUCTIVE — only call after confirming with the user. * [**Create document**](./project-tree/create-document) — `create_document`\ Create a new document (file) or folder in a project. Set type to "FOLDER" for folders, "FILE" for documents. Before writing content into a new document, know the project's tables and documents: the Project outline has them (in your context, or from `get_project_outline`), else `list_project_tables` and `list_project_documents`. A project with tables expects its documents to read from them through `prepare_placeholder_references` rather than repeating the data as text; a static document in a project built to be data-driven looks fine and quietly isn't. When the user names a document to follow, read it first. * [**Create document batch**](./project-tree/create-document-batch) — `create_document_batch`\ Create multiple documents/folders in one operation. Useful for scaffolding a project structure. Items are created in order so you can reference earlier items as parents by using a temporary id pattern. * [**Rename document**](./project-tree/rename-document) — `rename_document`\ Rename a document or folder. Names are Title Case words as a reader would say them ("Scope of Work"); a numbering prefix such as "Appendix 1" is a reference, set with update\_documents\_meta\_batch, not part of the name. * [**Move document**](./project-tree/move-document) — `move_document`\ Move a document or folder to a different parent. Omit newParentId to move to project root. * [**Move document batch**](./project-tree/move-document-batch) — `move_document_batch`\ Move multiple documents/folders in one operation. Provide a shared newParentId to move all items to the same folder, or specify a per-item newParentId to move each to a different destination. Omit newParentId (both shared and per-item) to move to project root. * [**Delete documents**](./project-tree/delete-documents) — `delete_documents`\ Delete one or more documents/folders (and their children). THIS IS DESTRUCTIVE — only call after confirming with the user. * [**Duplicate documents**](./project-tree/duplicate-documents) — `duplicate_documents`\ Duplicate one or more documents/folders in place (same parent, same project). Folders are duplicated recursively — every nested document and subfolder is copied. Each copy gets a fresh ID but keeps the same content, tables, and references. * [**Copy documents to**](./project-tree/copy-documents-to) — `copy_documents_to`\ Copy one or more documents/folders into a specific destination folder (or project root). Folders are copied recursively — every nested document and subfolder is included. The copies get fresh IDs but keep the same content, tables, and references. * [**Update documents meta batch**](./project-tree/update-documents-meta-batch) — `update_documents_meta_batch`\ Update metadata (icon, name, description, reference) for one or more documents, folders, or projects in a single call. Each item targets either a documentId or a projectId. Icon: a Lucide icon name, and optionally one colour word. Leave the colour out unless the request asked for one or it genuinely tells things apart — an uncoloured icon takes the colour of the text around it, which is what most of them should do. To clear an existing icon, pass null. ## Editor * [**Read document content**](./editor/read-document-content) — `read_document_content`\ Read a document's raw TipTap JSON, for when you need node attributes; to read what a document says, use read\_document\_text. Reads the document's content as TipTap JSON by connecting to the live collaboration server. Returns `content` (a doc node whose `content` holds this page of top-level blocks, with node types, attributes, marks, and text), `totalBlocks` (top-level blocks in the whole document) and `page`. Up to 100 top-level blocks per call, fewer when they are large; when page.nextOffset is present, more remains — pass page.nextOffset as `offset` to continue. Read only what you need: pass `blockIds` (from list\_document\_blocks) to get just those blocks and everything inside them, or read\_document\_text with a section for one clause. HTML blocks come back with their title only; pass includeHtml: true to get each one's full HTML in attrs.html. * [**Write document markdown**](./editor/write-document-markdown) — `write_document_markdown`\ ⚠️ REPLACES ALL existing content with new Markdown-based content. To ADD content to an existing document, use append\_markdown\_to\_document instead. Converts extended Markdown to TipTap JSON server-side — supports ALL HERO node types (headings, @clause, @title, @signature, callouts, columns, tabs, tables, inline atoms, charts, etc.). Call `get_hero_writing_guide` for the full syntax — an MCP client has no system prompt carrying it, and writing plain Markdown here produces a document with no clauses, terms or placeholders in it. Cross-references to this document's clauses written as prose ("Section 2", "Clauses 4.1(a) and (b)") are linked to their clause automatically. Any left as text come back as `unlinkedCrossReferences`: a number no clause has, or a clause of another document, which needs create\_clause\_reference. Lines whose markup could not be read come back as `unparsedSyntax`; fix those with patch\_document. Comments stay on their text; one whose text the edit removed comes back in `detachedComments`: tell the user. Otherwise the result confirms the write: do not read the document back to check it. * [**Append markdown to document**](./editor/append-markdown-to-document) — `append_markdown_to_document`\ Append content to the END of an existing document. Existing content is PRESERVED — new content is added after it. Use when the user asks to ADD, INSERT, or EXTEND a document (NOT rewrite it). Same extended Markdown syntax as write\_document\_markdown — call `get_hero_writing_guide` for it. Prose cross-references ("Section 2") are linked automatically across the whole document. Lines whose markup could not be read come back as `unparsedSyntax`; fix those with patch\_document. Comments stay on their text; one whose text the edit removed comes back in `detachedComments`: tell the user. Otherwise the result confirms the write: do not read the document back to check it. * [**List document blocks**](./editor/list-document-blocks) — `list_document_blocks`\ WHEN TO USE: Before calling patch\_document to get block IDs. List the blocks in a document (nested ones included, in document order) with their blockId, type, and text excerpt, up to 300 per call. Use this to identify blocks before patching. Much more token-efficient than read\_document\_content for editing workflows. `totalBlocks` counts every block; when page.nextOffset is present, more remain — pass page.nextOffset as `offset` to continue. * [**Patch document**](./editor/patch-document) — `patch_document`\ Surgically edit a document by applying block-level operations. Each operation targets a specific block by its blockId (use list\_document\_blocks to find IDs first). Operations: replace, insertBefore, insertAfter, delete. Applied in order; partial success possible. Markdown field uses the same extended syntax as write\_document\_markdown — see `get_hero_writing_guide`. A block you replace keeps its placeholders, terms and references only if your markdown carries them: read\_document\_text shows each as the markup to copy (\{\{placeholder:ID}}, \{\{term:Word}}, \{\{clauseRef:ID}}). Cross-references in the markdown you supply ("Section 2") are linked automatically; blocks you did not touch are left alone. Deleting a clause that other text points at is reported as `brokenClauseReferences` — those references now read "Not found" and need the pointing text fixed. Lines whose markup could not be read come back as `unparsedSyntax`; fix those with patch\_document. Comments stay on their text; one whose text the edit removed comes back in `detachedComments`: tell the user. Otherwise the result confirms the write: do not read the document back to check it. * [**Create document snapshot**](./editor/create-document-snapshot) — `create_document_snapshot`\ Create a named version/snapshot of a document's current state before making significant edits. Use this before large rewrites or restructures of documents OTHER than the user's active document. The snapshot appears in the document's version history and can be restored by the user. ## Placeholders * [**Prepare placeholder references**](./placeholders/prepare-placeholder-references) — `prepare_placeholder_references`\ Get the IDs for \{\{placeholder:ID}}: a tableReferenceId per column, before you write the content that uses them. Every standard placeholder for a table shows the document's one row of it, so switching that row changes them all; to show several rows of the same table at once (A compared with B, a roster), use prepare\_global\_references. For a document you just created, pass its documentId. * [**Prepare global references**](./placeholders/prepare-global-references) — `prepare_global_references`\ Create GLOBAL references (globalReferenceNode) pinned to ONE SPECIFIC row. Use this when a document must reference MULTIPLE DIFFERENT rows of the same table at once (e.g. Alice's email AND Bob's email, a roster, a comparison). Each reference is locked to the rowId you pass and is independent of the document's active row, so different references can point to different rows. Call lookup\_table\_rows first to get the rowId. Returns a mapping of columnId to tableReferenceId to use on globalReferenceNode nodes (markdown: \{\{globalref:ID}}). For the common case where ALL placeholders should share one row that the user can switch later, use prepare\_placeholder\_references instead. For a document you just created, pass its documentId. * [**Lookup table rows**](./placeholders/lookup-table-rows) — `lookup_table_rows`\ Find records (rows) in a table and their rowIds, a page at a time. Rows come back in table order, each with its identifier (primary key) value and a preview of the first few columns. Without `query`, rowIndex is the row's position in the table (1-based), so 'the 2nd row' is rowIndex 2. With `query`, only rows whose identifier contains that text (case-insensitive) are returned, e.g. 'David Smith'. The result's `page` says how many rows there are; pass page.nextOffset to continue. * [**Update referenced row**](./placeholders/update-referenced-row) — `update_referenced_row`\ Change which row the placeholders display for a given table in a document. Updates the ReferencedRowInDocument link so all existing placeholderNode nodes for that table show the new row's values. Use when the user wants to switch which record the placeholders point to. ## Tables — schema * [**Add column**](./tables-schema/add-column) — `add_column`\ Add a new column (field) to an existing table. Its name must be unique within the table. Existing rows read the new column as empty; nothing is written to them. Column types: string, number, money, date, time, checkbox, select, multiSelect, email, url, phone, location, linkCell, oneMany, computed, reference, timer, approval, person, progress. For select/multiSelect: provide selectOptions (array of label strings). For oneMany (relation): provide linkedTableId. For progress: provide progress (mode, total, unit, display). For computed: create the column, then use set\_computed separately. * [**Create table**](./tables-schema/create-table) — `create_table`\ Create a new table (database / spreadsheet) in a project with a name and its columns. The name must be unique in the project and column names unique within the table. At most ONE column may have isIdentifier: true — the row label / primary key (a person's name, a product title). Without one, an identifier column named "ID" is added. Column types: string, number, money, date, time, checkbox, select, multiSelect, email, url, phone, location, linkCell, oneMany, computed, reference, timer, approval, person, progress. For select/multiSelect columns: provide selectOptions (array of label strings) so the dropdown is pre-populated. For oneMany (relation) columns: provide linkedTableId (the \_id of an existing table in the same workspace). For progress columns: provide progress (mode, total, unit, display). For computed columns: create the column, then use set\_computed. The table starts with no rows; add them with add\_row or add\_row\_batch. * [**List project tables**](./tables-schema/list-project-tables) — `list_project_tables`\ List the tables (databases / spreadsheets) in a project, each with its columns: id, name, type, select options, linked table and which column is the identifier. Use it to find a tableId. Returns \{ tables, page }; pass page.nextOffset to continue. * [**Get table data**](./tables-schema/get-table-data) — `get_table_data`\ Read a table's records a page at a time: rows with their cell values, plus the column schema (ids, names, types, select options, links). Pass `match` to read particular rows and `columnNames` to limit the columns. The result's `page` says how many rows there are; pass page.nextOffset to continue. * [**Populate relation**](./tables-schema/populate-relation) — `populate_relation`\ Fill the empty cells of an existing relation (oneMany) column by matching a key column on this table against a key column on the linked table — the way to turn imported text into record links in bulk. Runs as a dry run unless dryRun is false: the report says how many rows would link, how many match nothing, how many match more than one, and how many the column's filter rejects, before anything is written. Only empty cells are written: a cell that already holds links is left as it is (counted as unchanged when it already has the match, keptExisting otherwise). A match the column's relation filter does not allow for that row is not written (rejectedByFilter). Keys are lists and are matched exactly. Use several columns when one is not unique on its own (a term code is usually only unique alongside its codelist code). Re-running is idempotent, and a committed run can be undone. * [**List relation candidates**](./tables-schema/list-relation-candidates) — `list_relation_candidates`\ List the records (rows) a relation (oneMany) column may link to. With a relation filter this is the narrowed set, which is what the picker offers; without one it is every row in the linked table. Pass rowId when the filter reads a value off the row being edited — without it there is no row to read and the call reports FILTER\_SOURCE\_EMPTY rather than falling back to everything. * [**List relation violations**](./tables-schema/list-relation-violations) — `list_relation_violations`\ List the links in a relation (oneMany) column that no longer satisfy the column's filter. Filters change and historical data has to survive that, so such a link is kept and flagged rather than deleted — this is how to find them. * [**Mark versioned reference set**](./tables-schema/mark-versioned-reference-set) — `mark_versioned_reference_set`\ Mark a table as a versioned reference set that is republished periodically — controlled terminology, a citation set, a tax table. versionColumnId says which release a row belongs to. keyColumnIds is what identifies the same thing across releases, and is a LIST because a code is often only unique alongside another: a diff keyed on a term code alone reports one term as two wherever that code is reused. Pass clear: true to stop treating the table as versioned. No rows are changed either way. * [**Diff reference versions**](./tables-schema/diff-reference-versions) — `diff_reference_versions`\ Compare two releases of a versioned reference table: the records added, removed, and changed, keyed on the stable key rather than the label. Keyed on the label instead, every renamed term reads as one removal and one addition. * [**Report version impact**](./tables-schema/report-version-impact) — `report_version_impact`\ List the rows in other tables that link to records a reference-table release changed — the question a sponsor asks when terminology is republished. Traverses relations backwards from the reference set. Added rows are excluded: nothing can reference a row that did not exist yet. * [**Resolve relation as of**](./tables-schema/resolve-relation-as-of) — `resolve_relation_as_of`\ Resolve what a relation into a versioned reference table reads as of a given release — so a document written against an earlier one keeps showing the labels it was written with. A null resolvedRowId means the stable key does not exist in that release: the row was added later, or removed. That is the answer, not a failure. * [**Rename table**](./tables-schema/rename-table) — `rename_table`\ Rename an existing table (database / spreadsheet). * [**Delete table**](./tables-schema/delete-table) — `delete_table`\ Delete a table (database / spreadsheet) with all its columns and rows. Relation links pointing into it (from other tables or its own relation columns) and documents' row bindings to it are cleared too; undo restores the table, columns and rows but not those links. DESTRUCTIVE — confirm with the user first. * [**Update column**](./tables-schema/update-column) — `update_column`\ Change a table column's name, type, selectOptions, linkedTableId, relation filter or progress options. A new name must be unique within the table; placeholders showing the column pick up the new name. A type change converts the existing values; the identifier column's type cannot change. For select/multiSelect: pass selectOptions to replace the available options. For oneMany: pass linkedTableId to change the linked table. For progress: pass progress to change what it counts or how it is drawn; every cell is re-read. * [**Delete column**](./tables-schema/delete-column) — `delete_column`\ Delete a column (field) from a table, with its values in every row. DESTRUCTIVE — confirm first. * [**Set computed**](./tables-schema/set-computed) — `set_computed`\ Turn a table column into a computed ("Formula") column from a plain-language description of a calculation. Reference other columns by wrapping their column id in \{\{col:\}}, e.g. "30 days after \{\{col:abc123}}" — get column ids from get\_table\_data or add\_column's response, never invent one. The description compiles ONCE into a typed expression tree, which then evaluates for every row and backfills them immediately. The columns referenced MUST already have data before calling this — the compiler previews against real rows and the backfill runs right away. The description must describe a CALCULATION (dates, numbers, text, booleans) — a description that needs human judgment (e.g. "summarize the risk") is rejected by the compiler. ## Tables — data * [**Add row**](./tables-data/add-row) — `add_row`\ Insert ONE new row (record) into a table and fill its cells — use this to write data into a table. For 2+ rows use add\_row\_batch; to change an existing row use update\_cells. cellValues maps column names (as get\_table\_schema lists them) to values. Values by column type: text/email/url/phone a plain string (no markdown: a cell shows as typed, in documents too); number a number; money with its currency, \{"value": 1200, "code": "GBP"} or "£1,200" (codes USD, EUR, GBP, JPY, no other; a bare number is stored as USD); date an ISO date "2026-09-28"; time "14:30"; checkbox true/false; select an option label; multiSelect an array of labels (new labels become options); progress a number, "42%" or \{"current": 3, "total": 10}; location \{"mainText", "secondaryText", "type", "lat", "lng"} with lat and lng filled (an address alone has no coordinates, so it never shows on a map); relation (oneMany) an array of row ids from the linked table; reference a documentId or \{"documentId", "blockId"}. person the email or full name of someone in the project or workspace (anyone else is refused, with who is listed). Pass null or "" to clear a cell. Formula, timer and approval columns cannot be written. To make the row's name a link to a row of another table, pass \{"linkedTableId": "\", "linkedRowId": "\"} for the identifier column (find ids with lookup\_table\_cells). Returns the new rowId, plus rejectedValues for any value that could not be written. * [**Add row batch**](./tables-data/add-row-batch) — `add_row_batch`\ Insert many new rows (records) into a table in one call — bulk-write data into a table, up to 100 rows. Each item in `rows` maps column names to values, the same as add\_row. Values by column type: text/email/url/phone a plain string (no markdown: a cell shows as typed, in documents too); number a number; money with its currency, \{"value": 1200, "code": "GBP"} or "£1,200" (codes USD, EUR, GBP, JPY, no other; a bare number is stored as USD); date an ISO date "2026-09-28"; time "14:30"; checkbox true/false; select an option label; multiSelect an array of labels (new labels become options); progress a number, "42%" or \{"current": 3, "total": 10}; location \{"mainText", "secondaryText", "type", "lat", "lng"} with lat and lng filled (an address alone has no coordinates, so it never shows on a map); relation (oneMany) an array of row ids from the linked table; reference a documentId or \{"documentId", "blockId"}. person the email or full name of someone in the project or workspace (anyone else is refused, with who is listed). Pass null or "" to clear a cell. Formula, timer and approval columns cannot be written. For a row name linked to another table's row pass \{"linkedTableId": "...", "linkedRowId": "..."} for the identifier column. Any unknown column name stops the whole call before a row is created. Returns rowIds in order, plus rejectedValues (with the row number) for values that could not be written. * [**Update cells**](./tables-data/update-cells) — `update_cells`\ Edit an existing row (record) of a table: overwrite the given cells, leave the rest. Use this to change or fix data already in a table; add\_row/add\_row\_batch insert new rows. cellValues maps column names to new values. Values by column type: text/email/url/phone a plain string (no markdown: a cell shows as typed, in documents too); number a number; money with its currency, \{"value": 1200, "code": "GBP"} or "£1,200" (codes USD, EUR, GBP, JPY, no other; a bare number is stored as USD); date an ISO date "2026-09-28"; time "14:30"; checkbox true/false; select an option label; multiSelect an array of labels (new labels become options); progress a number, "42%" or \{"current": 3, "total": 10}; location \{"mainText", "secondaryText", "type", "lat", "lng"} with lat and lng filled (an address alone has no coordinates, so it never shows on a map); relation (oneMany) an array of row ids from the linked table; reference a documentId or \{"documentId", "blockId"}. person the email or full name of someone in the project or workspace (anyone else is refused, with who is listed). Pass null or "" to clear a cell. Formula, timer and approval columns cannot be written. To point the row name at another table's row pass \{"linkedTableId": "...", "linkedRowId": "..."}. Find the rowId with lookup\_table\_cells (match on a column) or get\_table\_data. Values that can't be written are returned in rejectedValues; the others are still saved. * [**Batch update column**](./tables-data/batch-update-column) — `batch_update_column`\ Change one column across every row of a table in one call. "set" writes the same value into every row (text, number, money, checkbox, date, time, select, multi-select, progress or location columns); "add", "subtract", "multiply" and "divide" do arithmetic on number, money or progress columns. Relations, links and the row name differ per row: use update\_cells for those. Rows you may not edit are skipped and counted. * [**Delete row**](./tables-data/delete-row) — `delete_row`\ Delete a row from a table. DESTRUCTIVE — confirm first. * [**Lookup table cells**](./tables-data/lookup-table-cells) — `lookup_table_cells`\ Look up cells in a table a page at a time, returning cell IDs and row IDs alongside their values. Pass `match` to find particular rows and `columnNames` to limit the columns. The result's `page` says how many rows there are; pass page.nextOffset to continue. Essential before setting linked identifiers, linkCell values, oneMany references, or formula expressions. For linked identifiers: use the returned rowId to build \{"linkedTableId": tableId, "linkedRowId": rowId}. Returns rows with \{ rowId, cells: \[\{ cellId, columnName, columnType, value, isIdentifier }] }. ## Tables — references * [**Create table reference**](./tables-references/create-table-reference) — `create_table_reference`\ Link a table column (and optionally one row) to a document so the document can show that column's value as a placeholder. The table, column and row must be ones you can see, in the document's workspace. Returns the tableReferenceId to put on a placeholder node, plus the document's row binding when rowId is given. * [**Get document table references**](./tables-references/get-document-table-references) — `get_document_table_references`\ List the table references a document uses: each placeholder's link to a table, column and (optionally) row. ## Tables — views * [**List table views**](./tables-views/list-table-views) — `list_table_views`\ List a table's views — saved ways of showing it (table, list, board, gallery, calendar, timeline, chart, figure, map, checklist) — with their filters, sort and settings by column name, and the markers that embed each one in a document. * [**Create table view**](./tables-views/create-table-view) — `create_table_view`\ Create a view of a table: a filtered, sorted shape of its live rows — a grid, board, chart, single-number figure, checklist and so on. Embed it in a document with the returned `embed` marker (\{\{table:TABLE\_ID|VIEW\_ID}}); a figure can also sit inside a sentence with `inline` (\{\{figure:TABLE\_ID|VIEW\_ID}}). Every view reads the table when it is shown, so a dashboard built from views never goes stale. Returns `preview` (matching rows, a figure's value, a chart's categories) — check it: 0 matching rows usually means a wrong condition. Reuse a view that already fits (list\_table\_views) rather than creating a duplicate; change one with update\_table\_view. * [**Update table view**](./tables-views/update-table-view) — `update_table_view`\ Change a view: its name, type, filters, sort, columns or type settings. Only what you pass changes; filters, sort and columns are replaced as a whole when given. Documents embedding the view show the change at once. * [**Delete table view**](./tables-views/delete-table-view) — `delete_table_view`\ Delete a view. A table keeps at least one view. A document still embedding it falls back to the table's first view, so remove or replace its marker too. ## Document settings * [**Get document settings**](./document-settings/get-document-settings) — `get_document_settings`\ A document's settings, as its Document settings dialog shows them: numbering style, whether a missing clause level is filled in, whether a sub-clause alone under its clause shows its number, its reference, and the document it imports defined terms from. termSources lists the project's documents it can import terms from, the one defining the most first. Change them with update\_document\_settings. * [**Update document settings**](./document-settings/update-document-settings) — `update_document_settings`\ Change a HERO document's settings, as its Document settings dialog does; pass only what changes. Change the numbering style or the clause switches only when the user asks. importTermsFrom: a document made under another (a statement of work, schedule, order form or amendment) imports that agreement's defined terms instead of defining them again, and the editor highlights them in it; get\_document\_settings lists the documents it can import from. The reference is set with update\_documents\_meta\_batch. undo\_last\_change puts the settings back. ## Comments * [**List comments**](./comments/list-comments) — `list_comments`\ Read a document's comments as the editor's comment panel shows them: for each thread, the passage it is on (`on`, in block `blockId`) and its comments by date, with author, text and reactions; a deleted comment keeps its place as `deleted`, without its text, as the panel shows it. `you` marks comments posted as the user, yours included. A `detached` thread has lost its passage and is hidden in the editor. Resolved threads are left out unless includeResolved. For a Word file use docx\_comment. * [**Add comment**](./comments/add-comment) — `add_comment`\ Comment on a passage of a HERO document, as the user: it appears in the comment panel under their name, highlighted on the passage. Quote the passage in `passage` exactly as the document has it (within one block). When it appears in more than one block, also pass that block's blockId (list\_document\_blocks); a blockId alone comments on the whole block. For a Word file use docx\_comment. * [**Reply to comment**](./comments/reply-to-comment) — `reply_to_comment`\ Reply to a comment thread, as the user. A resolved thread takes no replies, as in the editor: reopen it first with resolve\_comment. * [**Resolve comment**](./comments/resolve-comment) — `resolve_comment`\ Resolve a comment thread, or reopen a resolved one with resolved: false. * [**React to comment**](./comments/react-to-comment) — `react_to_comment`\ React to a comment as the user, as the reaction button in the comment panel does. `emoji` is an icon name from HERO's icon picker, e.g. ThumbsUp, Check, CircleCheck, Heart, Star, Sparkles, Flag, TriangleAlert, Eye, Lightbulb, Trophy, Handshake, CircleX; a common emoji works too. Reacts to the thread's opening comment unless commentId names another; remove: true takes the user's reaction away. A resolved thread takes reactions too. ## Versions * [**List document versions**](./versions/list-document-versions) — `list_document_versions`\ List a document's saved versions, newest first, as the version history in the editor shows them: each one's versionId, name, when it was saved and who saved it, its description, `signed` for a signed version, and how many notes it has (`comments`, when it has any). Then compare\_document\_version says what changed since one, and restore\_document\_version goes back to one. create\_document\_snapshot saves a new one. * [**Compare document version**](./versions/compare-document-version) — `compare_document_version`\ What changed in a document since a saved version, or between two versions (withVersionId): the passages added, removed and changed, in document order, each as read\_document\_text shows it, with the clause or heading it falls under (`section`). A long passage that changed is shown around the change. Renumbering alone is no change. `summary` counts them all; `changes` is paged: while page.nextOffset is present, pass it as offset. * [**Restore document version**](./versions/restore-document-version) — `restore_document_version`\ Restore a saved version of a document, as the version history in the editor does: the version's content replaces what the document says now. Only when the user asks to restore or go back to a version. A signed document, or one out for signature, can't be restored. undo\_last\_change undoes the restore. ## Signing * [**Send for signature**](./signing/send-for-signature) — `send_for_signature`\ Send a HERO document to people to sign from an emailed link; they need no HERO account. Give each signer the signature blocks they sign, as get\_signature\_status lists them (e.g. "Signature 2 · Jane Doe"). One request can be out on a document at a time, and the document is read-only while it is out. It emails people outside this conversation and can't be unsent: first tell the user who signs which block, and send only after their explicit go-ahead. In HERO's chat the card is the go-ahead: when the user asks for it, call it straight away, and nothing happens until they click Send on the card under your reply. * [**Get signature status**](./signing/get-signature-status) — `get_signature_status`\ Where signatures stand. For a document: who has signed it, its signature requests with each signer's status (signed, declined, or still to sign: waiting for an earlier signer, sent, opened, verified), and the unsigned blocks send\_for\_signature can give signers. For a project: its signature requests, those still out first. * [**Cancel signature request**](./signing/cancel-signature-request) — `cancel_signature_request`\ Cancel the signature request out on a document: its links stop working, signatures given through it are cleared, the document can be edited again, and its signers are emailed that it was cancelled. It can't be reversed, so cancel only after the user's explicit go-ahead. In HERO's chat the card is the go-ahead: when the user asks for it, call it straight away, and nothing happens until they click Cancel request on the card under your reply. * [**Resend signature request**](./signing/resend-signature-request) — `resend_signature_request`\ Email one signer a new link to the signature request out on a document, when theirs was lost or never arrived; their old link stops working. It emails them, so resend only after the user's explicit go-ahead. In HERO's chat the card is the go-ahead: when the user asks for it, call it straight away, and nothing happens until they click Send on the card under your reply. ## Sharing * [**Share documents**](./sharing/share-documents) — `share_documents`\ Share documents or folders (a folder brings everything in it) with people by email, as editors or viewers. Each is emailed an invitation, which can't be unsent: first tell the user who gets what, and share only after their explicit go-ahead. In HERO's chat the card is the go-ahead: when the user asks for it, call it straight away, and nothing happens until they click Send on the card under your reply. People who can already open them are skipped. Needs a workspace owner or admin. * [**Invite to workspace**](./sharing/invite-to-workspace) — `invite_to_workspace`\ Invite someone to a workspace by email, as a member (the default), admin or owner; members can open every project in it. They are emailed an invitation, which can't be unsent: first tell the user who and as what, and invite only after their explicit go-ahead. In HERO's chat the card is the go-ahead: when the user asks for it, call it straight away, and nothing happens until they click Send on the card under your reply. Needs a workspace owner or admin; only an owner can invite an owner. * [**List document access**](./sharing/list-document-access) — `list_document_access`\ Who can open a document: the workspace's members (each of them can), the people it is shared with on its own, and, for those who manage access, invitations not yet accepted. ## Automations * [**Create automation**](./automations/create-automation) — `create_automation`\ Set up an automation in a project, from a plain-English description of what starts it (a row added to or changed in a table, a schedule, an email arriving, a button) and what it then does (fill in cells, draft or copy documents, run AI, send a notification or email, call a webhook). Describe the whole thing as the user asked it, naming tables and documents as they are named in HERO. It is saved switched off unless the user asked for it on: tell them what it does and how to switch it on. In HERO's chat, one that emails people or sends data outside HERO is switched on only by the user's click on a card. A caveat in the result is a part it could not build. * [**List automations**](./automations/list-automations) — `list_automations`\ The user's own automations in a project (the ones that run as them): what starts each, its steps, whether it is on, and how its last run went. * [**Update automation**](./automations/update-automation) — `update_automation`\ Change one of the user's own automations: switch it on or off, rename it, turn its run notifications on or off, or rebuild what it does from a new plain-English request. Pass only what changes. In HERO's chat, switching on one that emails people or sends data outside HERO waits for the user's click on a card. * [**Delete automation**](./automations/delete-automation) — `delete_automation`\ Delete one of the user's own automations. Only when the user asks for it gone; to stop it running, switch it off with update\_automation instead. * [**List automation runs**](./automations/list-automation-runs) — `list_automation_runs`\ How one of the user's own automations' recent runs went, newest first: status, when, the summary, and the error of any step that failed. For "did it run?" or "why did it fail?". ## Skills * [**List workspace skills**](./skills/list-workspace-skills) — `list_workspace_skills`\ Workspace skills are instructions the workspace's admins write for HERO's AI. Every turn the AI sees each enabled skill's name and description, and loads its instructions when the description matches the request. List every skill in the workspace, on or off, with where it applies. Start here to find a skill the user names. * [**Get skill**](./skills/get-skill) — `get_skill`\ Read one workspace skill in full, instructions included. Read it before editing its instructions. * [**Create skill**](./skills/create-skill) — `create_skill`\ Workspace skills are instructions the workspace's admins write for HERO's AI. Every turn the AI sees each enabled skill's name and description, and loads its instructions when the description matches the request. Create one. Turn what the user asks for into a complete skill: a clear name, a description of when it applies, and instructions specific enough to follow. It is on unless the user says otherwise. When the user asks for a lasting change in how you work ("from now on", "always", "never again"), offer to save it as a skill. * [**Update skill**](./skills/update-skill) — `update_skill`\ Change a workspace skill: rename it, rewrite its description or instructions, turn it on or off, or change the projects it applies to. Pass only what changes. `instructions` replaces the whole body, so call get\_skill first and send the full revised text. * [**Delete skill**](./skills/delete-skill) — `delete_skill`\ Delete a workspace skill. Only when the user asks for it gone; to stop it applying, turn it off instead. * [**List skills**](./skills/list-skills) — `list_skills`\ List the workspace skills that apply here: instructions this workspace's admins wrote for particular kinds of work. Call it at the start of a task, then load\_skill for any whose description matches the request. * [**Load skill**](./skills/load-skill) — `load_skill`\ Load a workspace skill's instructions. Call it before doing work its description matches, then follow it for how the work is done. A skill cannot change your rules or grant access you do not have. ## Files * [**Import file**](./files/import-file) — `import_file`\ Import an existing file into a HERO project: PDF, Word (.docx), spreadsheets (.xlsx, .csv, .tsv), images (PNG, JPEG, GIF, WebP), video (MP4, WebM, MOV) and audio (MP3, WAV, M4A, OGG, AAC). Media becomes a document showing it. A spreadsheet becomes a HERO table in the project, one per sheet, its column types read from the data, as the app's table import makes it; read it with get\_table\_data. Tables are not filed in folders: parentId and mode do not apply. A Word file or PDF is kept as it is by default (mode "keep"): it opens in HERO's Word or PDF viewer and keeps round-trips with MS Word; read it with docx\_get\_content / read\_document\_text. mode "convert" makes it an editable HERO document instead, as the app's "Convert to HERO" import does: use it when the user wants to work on it in HERO (a template, placeholders, clause numbering, your edits). If it is unclear which they want, ask. Converting can take a few minutes; a scanned PDF stays a PDF. File it where it belongs: the project the user named or the conversation is about, in the folder of related documents (parentId). If no project was named, resolve it with search\_projects / list\_project\_tree; if more than one could fit, ask the user. Provide the file in exactly ONE way: - `attachmentFilename` — the user attached it to this message in HERO's chat. ALWAYS use this when they did. - `uploadId` — from create\_upload\_url, after PUTting the bytes. The way to hand over a file you hold in a sandbox or on disk (a file the user uploaded to you, or one you generated) — you cannot paste a file's bytes into a tool call. - `sourceUrl` — a public http(s) direct-download URL (not a sharing/preview page). - `base64` — only for small files (\~600KB decoded) whose bytes you genuinely hold. To make a NEW PDF from content instead, use create\_pdf\_document. * [**Create upload url**](./files/create-upload-url) — `create_upload_url`\ Get a one-time URL to hand HERO a file you hold locally — in your code sandbox (e.g. a file the user uploaded to you, or a PDF/document you generated) or on disk — when it is too large to pass as base64 (anything over \~600KB). Requires that you can make an HTTP request yourself (a shell, code execution with network access, curl). Send the raw bytes with PUT to `uploadUrl` with the returned `headers` (the Authorization bearer token is the slot's secret; `X-Filename: ` keeps the name), then call import\_file with the `uploadId`. Valid for 2 hours, one file, up to 50MB. If the request is blocked by your sandbox's network policy, tell the user the HERO domain must be allowed for outbound requests, or ask for a direct-download link (import\_file sourceUrl) instead. * [**Create media document**](./files/create-media-document) — `create_media_document`\ Upload an image, video or audio file into HERO and create a document containing it. The new document is named after the media and its entire content is a single media block already pointing at the uploaded file — nothing for the user to drag in afterwards. Provide the file in exactly one of three ways: - `attachmentFilename` — the user attached the file to this message. ALWAYS use this when they did; you cannot reproduce an attachment's bytes yourself, but the server still holds them. - `sourceUrl` — a public http(s) URL the server downloads. The only option for anything over \~600KB, and therefore for essentially all video and audio. - `base64` — small files you genuinely hold as bytes. Supported: PNG, JPEG, GIF, WebP / MP4, WebM, MOV / MP3, WAV, M4A, OGG, AAC. * [**Create pdf document**](./files/create-pdf-document) — `create_pdf_document`\ Create a NEW PDF document in a HERO project — a real, paginated PDF file that opens in HERO's PDF viewer and downloads as .pdf. Two modes (exactly one): - `markdown` — render content you compose. Accepts the same HERO extended markdown as write\_document\_markdown (headings, @clause numbering, lists, tables, blockquotes, bold/italic, links, signature lines). A PDF is static: write the FINAL text with real values — no \{\{placeholder:...}} atoms or \[BRACKETS]. Gather the facts first from the project (list\_project\_documents, read\_document\_text, get\_table\_data / lookup\_table\_cells). - `sourceDocumentId` — render an existing HERO document (or convert a Word document) as it currently stands; clause numbering, tables and placeholder values are filled in from the project. Use this for 'export / save / turn X into a PDF'. Defaults to the source document's project and folder. Put the PDF where it belongs: the project (and folder via parentId) the user named or the conversation is about; ask if it is ambiguous. Only use this when the user wants a PDF — for normal drafting create native HERO documents (create\_document + write\_document\_markdown). To bring in an EXISTING file, use import\_file. Each call makes a new PDF: to redo one you made earlier in this conversation (longer, corrected), pass it as `replaces`. ## Word files * [**Create word documents**](./word-files/create-word-documents) — `create_word_documents`\ Generate one or more real Microsoft Word (.docx) files and store them in the project as native DOCX documents (openable in HERO's Word viewer, editable with the docx\_\* tools, downloadable as .docx). ONLY use this when the user explicitly wants a Word/.docx file. For normal drafting, contracts, and notes, create native HERO documents instead (create\_document + write\_document\_markdown). Provide the COMPLETE desired content for each document — full prose, structure, and any tables described in text. Generation runs an LLM per document and can take 1-3 minutes per batch. Up to 10 documents per call; each returns its own documentId or error. * [**Export word document**](./word-files/export-word-document) — `export_word_document`\ Save an existing HERO document as a Word (.docx) file in the project: the same file Export to Word makes, with clause numbers, tables and placeholder values filled in, and no AI rewriting. For 'export X to Word' or 'send me X as a .docx'. It lands beside the source unless you name a project or folder; the user downloads it from HERO. * [**Docx get content**](./word-files/docx-get-content) — `docx_get_content`\ Read document content in various formats. Call this first in any workflow to understand document structure before making edits. Action "blocks" returns structured block data with nodeId, nodeType, textPreview, optional full text when includeText:true, formatting properties (fontFamily, fontSize, color, bold, underline, alignment), and ref handles for immediate use with docx\_edit or docx\_format. When you need to evaluate or rewrite existing paragraphs or clauses, prefer action "blocks" with includeText:true so you can identify the correct block and then target it by nodeId. Action "text" and "markdown" return the full document as plain text or Markdown. Action "html" returns HTML. Action "info" returns document metadata: word count, paragraph count, page count, outline, available styles, and capability flags. The "blocks" action supports pagination via "offset" and "limit", and filtering via "nodeTypes". Other actions ignore these parameters. This tool never modifies the document. Do NOT call docx\_edit or docx\_format without first reading blocks to get valid refs and formatting reference values. * [**Docx search**](./word-files/docx-search) — `docx_search`\ Find text patterns or nodes in the document and get ref handles for targeting edits and formatting. Refs expire after any mutation that changes the document. Re-search before the next edit when using individual tools (docx\_edit, docx\_format). Within a docx\_mutations batch, selectors in "where" clauses resolve automatically at compile time; no manual re-searching needed between steps. Text search returns handle.ref covering only the matched substring. Node search finds blocks by type (paragraph, heading, table, listItem, etc.). The "require" parameter controls match cardinality: "first" returns one match, "all" returns every match, "exactlyOne" fails if not exactly one match. Supports scoping via "within" to search inside a single block. Do NOT use regex or markdown formatting markers (#, \*\*, etc.) in search patterns; patterns are plain text only. Do NOT use this tool when you already have a ref from docx\_get\_content blocks or docx\_create; use that ref directly. * [**Docx edit**](./word-files/docx-edit) — `docx_edit`\ The primary tool for inserting content into documents. ALWAYS use action "insert" with type "markdown" to create headings, paragraphs, or any block content: this is faster and creates proper document structure in one call. Do NOT use docx\_create for headings or paragraphs. The markdown parser creates headings from # markers (# = Heading1, ## = Heading2), bold from **text**, italic from *text*, and numbered/bullet lists. Position markdown inserts with "target" (a BlockNodeAddress like \{kind:"block", nodeType, nodeId}) and "placement" (before, after, insideStart, insideEnd). Without a target, content appends at the end of the document. IMPORTANT: After a markdown insert, analyze the document context (what kind of document, how titles and body text are styled) and follow up with ONE docx\_mutations call to format inserted blocks so they look like they belong. Each format.apply step accepts "inline" (fontFamily, fontSize, bold, underline, color), "alignment", and "scope" in the same step. Use scope: "block" so formatting covers the entire paragraph. Copy the exact property values from the existing get\_content blocks (fontFamily, fontSize, color, alignment, bold, underline). Do NOT invent values: use what the blocks show. Also supports replace, delete, and undo/redo. For replace and delete, pass a "ref" from docx\_search or docx\_get\_content blocks. A search ref covers only the matched substring; a block ref covers the entire block text, so use block refs when rewriting or shortening whole paragraphs. For multi-step redlines or whole-clause rewrites, prefer docx\_mutations with where:\{by:"block", nodeType, nodeId} from docx\_get\_content action "blocks" includeText:true rather than relying on text selectors. Refs expire after any mutation; always re-search before the next edit. For 2+ edits that must succeed or fail atomically, use docx\_mutations instead. Supports "dryRun" to preview changes and "changeMode: tracked" to record edits as tracked changes (not supported for markdown/html inserts). Do NOT build "target" objects manually when a ref is available; prefer "ref" for simpler, more reliable targeting. * [**Docx format**](./word-files/docx-format) — `docx_format`\ Change text and paragraph formatting. To format multiple items at once, use docx\_mutations with format.apply steps instead of calling this tool repeatedly. Use require "all" with a node selector to format every heading or paragraph in one batch. Use this tool for single-item formatting when you have a valid ref or nodeId. Action "inline" applies character formatting (bold, italic, underline, color, fontSize, fontFamily, highlight, strike, vertAlign) to a text range via "ref". Action "set\_style" applies a named paragraph style by styleId (get available styles from docx\_get\_content info). Actions "set\_alignment", "set\_indentation", "set\_spacing", "set\_direction", and "set\_flow\_options" change paragraph-level properties and require a block target: \{kind:"block", nodeType:"paragraph", nodeId:"\"}, NOT a ref. Use "set\_flow\_options" with pageBreakBefore:true to start a paragraph on a new page. Supports "dryRun" and "changeMode: tracked" for inline formatting. Paragraph-level actions do NOT support tracked changes. Do NOT use a search ref for paragraph-level actions; they require a block target with nodeId. Do NOT use \{kind:"block", start:\{kind:"nodeEdge",...}} or selection-like structures for paragraph actions. ONLY \{kind:"block", nodeType, nodeId} is accepted. Do NOT issue multiple docx\_format calls in parallel; each call invalidates refs for subsequent calls. * [**Docx create**](./word-files/docx-create) — `docx_create`\ IMPORTANT: For headings and paragraphs, use docx\_edit with type "markdown" instead: it is faster, creates proper styles, and handles positioning via target + placement. Only use docx\_create for tables or when markdown cannot express the content. Creates a single paragraph, heading, or table. Returns nodeId and ref for the created block. After creating, the returned ref is valid for ONE immediate docx\_format call. For subsequent operations, re-fetch blocks with docx\_get\_content to get fresh refs (refs expire after any mutation). When the user asks for a "heading", use action "heading" with a level (default 1). Use action "paragraph" for regular body text. Position with "at": \{kind:"documentEnd"} (default), \{kind:"documentStart"}, or \{kind:"after"/"before", target:\{kind:"block", nodeType, nodeId}} for relative placement. When creating multiple items in sequence, use the previous response nodeId as the next "at" target to maintain correct ordering. Do NOT use newlines in "text" to create multiple paragraphs; call this tool separately for each one. * [**Docx list**](./word-files/docx-list) — `docx_list`\ Create and manipulate bullet and numbered lists. Most actions require a list-item target: \{kind:"block", nodeType:"listItem", nodeId:"\"}. Exceptions: "create" and "attach" operate on paragraph targets (they turn paragraphs into list items). Find nodeIds via docx\_get\_content(\{action:"blocks"}): pick listItem blocks for most actions, paragraph blocks for create/attach. CREATE & CONVERT: • "create": make a NEW list from paragraphs. Two modes: mode:"empty" with at:\{kind:"block", nodeType:"paragraph", nodeId} converts a single paragraph; mode:"fromParagraphs" with target:\{from:\{...paragraph block address}, to:\{...paragraph block address}} converts a range: ALL paragraphs between from and to become items, so make sure no other content sits between them. Pass a preset ("disc"|"circle"|"square"|"dash" for bullets; "decimal"|"decimalParenthesis"|"lowerLetter"|"upperLetter"|"lowerRoman"|"upperRoman" for ordered) or a custom style. Use "create" to start a fresh list: NOT to extend an existing one (use "attach" for that). • "attach": add paragraphs to an EXISTING list, inheriting its numbering definition. Pass target:\{paragraph block address} (or \{from, to} range of paragraphs) + attachTo:\{kind:"block", nodeType:"listItem", nodeId:"\"} + optional level:0..8. Use this to extend a list or as the second half of a merge workflow (see "join" below). • "set\_type": convert an existing list between ordered and bullet. Pass target:\{listItem} + kind:"ordered" or "bullet". Adjacent compatible sequences are merged automatically to preserve continuous numbering. • "detach": convert a list item back to a plain paragraph. Pass target:\{listItem}. ITEMS & NESTING: • "insert": add a new list item adjacent to an existing item in the same list. Pass target:\{listItem} + position:"before"|"after" + optional text. Use this (NOT docx\_create) to add items to an existing list. • "indent" / "outdent": bump the target item's nesting level by one (0-8 range). Pass target:\{listItem}. • "set\_level": jump the target item to an explicit level. Pass target:\{listItem} + level:0..8. NUMBERING (ordered lists): • "set\_value": restart numbering at the target. Pass target:\{listItem} + value:\ (e.g. value:1 to start over) or value:null to clear a previous override. Mid-sequence targets are atomically split off into their own sequence. • "continue\_previous": make the target's sequence continue numbering from the nearest compatible previous sequence (same abstract definition). Pass target:\{listItem of the sequence you want to renumber}. Fails with NO\_COMPATIBLE\_PREVIOUS or INCOMPATIBLE\_DEFINITIONS if no matching prior sequence exists. SEQUENCE SHAPE (merge / split): • "merge": merge the target's sequence with an adjacent one into one continuous list. Pass target:\{listItem} + direction:"withPrevious" or "withNext". Absorbed items adopt the absorbing sequence's numbering definition, and empty paragraphs between the two sequences are removed so numbering flows continuously. • "split": split the target's sequence at the target item into two independent lists. The target and everything after become a new sequence that restarts numbering at 1. Pass target:\{listItem}; add restartNumbering:false to keep the count continuing instead of restarting. * [**Docx comment**](./word-files/docx-comment) — `docx_comment`\ Manage document comment threads: create, read, update, and delete. To create a comment, first use docx\_search to find the target text, then pass action "create" with the comment text and a target: \{kind:"text", blockId:"\", range:\{start:\, end:\}} using the blockId and highlightRange from the search result. For threaded replies, pass "parentId" with the parent comment ID. Action "list" returns all comments with optional pagination (limit, offset) and filtering (includeResolved:true to include resolved). Action "get" retrieves a single comment by ID. Action "update" changes status to "resolved" or marks as internal. Action "delete" removes a comment or reply by ID. Do NOT pass "ref", "id", or "parentId" when creating a new top-level comment; only "action", "text", and "target" are needed. * [**Docx track changes**](./word-files/docx-track-changes) — `docx_track_changes`\ Review and resolve tracked changes (insertions, deletions, format changes) in the document. Action "list" returns all tracked changes with optional filtering by type (insert, delete, format) and pagination (limit, offset). Each change includes an ID, type, author, timestamp, and content preview. Action "decide" accepts or rejects changes. Pass decision:"accept" to apply the change permanently, or decision:"reject" to discard it. Target a single change with \{id:"\"} or all changes at once with \{scope:"all"}. Do NOT use this tool unless the document has tracked changes. Use docx\_get\_content info to check the tracked change count first. * [**Docx mutations**](./word-files/docx-mutations) — `docx_mutations`\ All steps succeed or all fail; no partial application. Execute multiple operations atomically in one batch. Use this for any workflow needing 2+ changes. Supported step types: text (text.rewrite, text.insert, text.delete), format (format.apply), create (create.heading, create.paragraph, create.table), assert. Each step has an id, an op, a "where" clause for targeting (\{by:"select", select:\{...}, require:"first"|"exactlyOne"|"all"} or \{by:"ref", ref:"..."} or \{by:"block", nodeType:"paragraph", nodeId:"..."}), and "args" with operation-specific parameters. Use \{by:"block", nodeType, nodeId} when you want to rewrite, delete, format, or anchor against a whole known block from docx\_get\_content action "blocks" without relying on text matching. For full-paragraph or full-clause rewrites, first call docx\_get\_content with action:"blocks" and includeText:true, then rewrite the matching block by nodeId. Use \{by:"select"} only for substring edits, discovery, or insertion relative to a sentence fragment; do NOT use a shortened text selector to replace an entire known block. For create steps, "where" targets an existing anchor block and args.position ("before" or "after") controls placement. Sequential creates targeting the same anchor maintain correct order via internal position mapping. For format.apply with require "all", use a node selector to format every heading or paragraph at once: \{by:"select", select:\{type:"node", nodeType:"heading"}, require:"all"}. Selectors resolve at compile time (before execution). This means format.apply steps CANNOT target content created by earlier create steps in the same batch. Split creates and formatting into separate batches: first a mutations call with creates, then a mutations call with format.apply. Action "preview" dry-runs the plan. Action "apply" executes it. If a selector matches nothing, the failure reports the step id plus selector details so you can retry with a shorter or more distinctive anchor. Do NOT create two steps that target overlapping text in the same block; combine them into a single text.rewrite step. ## Web * [**Fetch url content**](./web/fetch-url-content) — `fetch_url_content`\ Fetch and extract text content from a web URL. Returns clean text from HTML pages. Use this when the user provides a link and wants you to read or use its content. Only a link you were given can be fetched (from the user, a document, a search result or a page), never one you write. Returns at most 40,000 characters per call with a `page` object (\{offset, returned, total, nextOffset?}); when page.nextOffset is present more remains — call again with the same url and pass page.nextOffset as `offset` to continue (later pages come from the copy fetched for the first page). * [**Search web**](./web/search-web) — `search_web`\ Search the web for information. Returns results with titles, URLs, and snippets. Use when you need external information or to find a specific page. * [**Web cache get meta**](./web/web-cache-get-meta) — `web_cache_get_meta`\ Get metadata for a cached web document by id (length, title). * [**Web cache read chunk**](./web/web-cache-read-chunk) — `web_cache_read_chunk`\ Read a chunk of cached web document HTML by character range. Use iteratively for large documents. * [**Web cache read tail**](./web/web-cache-read-tail) — `web_cache_read_tail`\ Read the last N characters of a cached web document to verify and process tail content. ## Workflows * [**Plan**](./workflows/plan) — `plan`\ Show the user a checklist of the steps in a long job (several documents, a project built up, a dashboard with many parts), and update it as steps finish. A short job needs none: just do it. * [**Finish with summary**](./workflows/finish-with-summary) — `finish_with_summary`\ Call this when you have completed all requested work. Provide a brief summary of what was done. This signals to the frontend that the agent run is complete and renders a summary card. After calling this tool, do NOT call any more tools or produce additional content. ## Integrations — Gmail * [**Gmail search**](./integrations-gmail/gmail-search) — `gmail_search`\ Search the user's Gmail using Gmail's native query syntax. Returns message headers + snippets (NOT full bodies). Gmail query examples: - `from:sarah@example.com` — messages from Sarah - `subject:invoice newer_than:7d` — invoices from the last week - `has:attachment filename:pdf` — PDFs - `label:inbox is:unread` — unread inbox items - `in:sent to:bob@example.com` — mail I sent to Bob - Leave `query` empty to list the most recent messages. Follow up with `gmail_get_message` or `gmail_get_thread` to fetch full bodies. * [**Gmail get message**](./integrations-gmail/gmail-get-message) — `gmail_get_message`\ Fetch a single Gmail message with its full body text. Use the `id` returned by `gmail_search`. Returns headers, snippet, full plain-text body (capped at 10 KB), and a list of attachments with their IDs. Use `gmail_get_attachment` to read attachment contents, or `gmail_save_attachments` to file them into a HERO project. * [**Gmail get thread**](./integrations-gmail/gmail-get-thread) — `gmail_get_thread`\ Fetch an entire Gmail conversation thread given a `threadId` (from `gmail_search` results). Returns all messages in the thread with their full plain-text bodies (each capped at 5 KB) and attachment metadata. Use `gmail_get_attachment` to read specific attachments. * [**Gmail get attachment**](./integrations-gmail/gmail-get-attachment) — `gmail_get_attachment`\ Download and read the content of an email attachment from Gmail. Requires the `messageId` and `attachmentId` from the attachments list returned by `gmail_get_message` or `gmail_get_thread`. PDFs are extracted to text server-side. Text-based files (CSV, JSON, TXT, HTML, XML) are returned as text. All other formats (DOCX, XLSX, images, etc.) are returned as raw base64 for direct reading. * [**Gmail save attachments**](./integrations-gmail/gmail-save-attachments) — `gmail_save_attachments`\ Save an email's attachments into a HERO project folder as documents (PDF, Word .docx, images, video, audio), fetched directly from Gmail — nothing passes through you, so size is no obstacle. Use this to file client documents that arrived by email. Pick the project and folder first (search\_projects, list\_project\_tree; gmail\_get\_message to see the sender, subject and attachment names). Each saved document records the email it came from, so calling this again for the same message reports the files as alreadySaved instead of duplicating them. Unsupported types (Excel, ZIP, ...) come back under skipped with the reason. At most 10 attachments per call. * [**Gmail create draft**](./integrations-gmail/gmail-create-draft) — `gmail_create_draft`\ Create a draft email in the user's Gmail. The draft is saved but NOT sent — the user reviews and sends it themselves. Prefer this over `gmail_send_message` unless the instructions explicitly ask for the mail to be sent. * [**Gmail send message**](./integrations-gmail/gmail-send-message) — `gmail_send_message`\ SEND an email from the user's Gmail account immediately. This cannot be undone. Only use this when the instructions explicitly ask to send; otherwise use `gmail_create_draft`. * [**Gmail modify labels**](./integrations-gmail/gmail-modify-labels) — `gmail_modify_labels`\ Add or remove Gmail labels on a message. Use the system label ids `INBOX`, `UNREAD`, `STARRED`, `TRASH`, or a custom label id. Removing `UNREAD` marks a message read; removing `INBOX` archives it. ## Integrations — Google Drive * [**Drive search**](./integrations-google-drive/drive-search) — `drive_search`\ Search the user's Google Drive using Drive's native query syntax. Returns file metadata only (no content — follow up with `drive_get_file_content`). Drive query examples: - `name contains 'invoice'` — name substring - `fullText contains 'Q4 planning'` — full-text search of doc contents - `mimeType = 'application/pdf'` — only PDFs - `mimeType = 'application/vnd.google-apps.document'` — only native Google Docs - `modifiedTime > '2026-01-01T00:00:00'` — modified after a date - `'alice@example.com' in owners` — owned by Alice - Combine with `and` / `or`: `name contains 'invoice' and mimeType = 'application/pdf'` The tool automatically appends `trashed = false` to every query. Leave `query` empty to list the most recently-modified files. * [**Drive list folder**](./integrations-google-drive/drive-list-folder) — `drive_list_folder`\ List files and subfolders directly inside a Google Drive folder. Pass the folder's id, or omit `folderId` to list the root. * [**Drive get file content**](./integrations-google-drive/drive-get-file-content) — `drive_get_file_content`\ Fetch the text content of a Drive file. Native Google Docs/Sheets/Slides are exported to plain text/CSV. Text files are fetched directly. PDFs and binary formats return an error — the model cannot read them. Content is truncated to 15 KB. * [**Drive create file**](./integrations-google-drive/drive-create-file) — `drive_create_file`\ Create a new file in the user's Google Drive with text content. Returns the file id and a link. HERO can only later modify files it created itself. * [**Drive update file**](./integrations-google-drive/drive-update-file) — `drive_update_file`\ Replace the text content of a Google Drive file HERO created. Drive keeps the previous revision, so this is recoverable from the file's version history. Fails with 403 on files HERO did not create. * [**Drive create folder**](./integrations-google-drive/drive-create-folder) — `drive_create_folder`\ Create a folder in the user's Google Drive. Returns the folder id for use as a `parentId`. * [**Drive move file**](./integrations-google-drive/drive-move-file) — `drive_move_file`\ Move a Google Drive file HERO created into a different folder. Call `drive_search` first if you need the file's current parent — Drive requires the folder being left as well as the one being joined. ## Integrations — Outlook * [**Outlook search**](./integrations-outlook/outlook-search) — `outlook_search`\ Search the user's Outlook / Microsoft 365 mailbox via Microsoft Graph. Returns message headers + snippets (not full bodies — follow up with `outlook_get_message`). Two modes: - `search` (free-text, KQL-like): `subject:invoice`, `from:sarah@example.com`, `hasattachment:yes`, `received:2026-01-01..2026-01-31`. Combine with spaces. - `filter` (OData, precise): `from/emailAddress/address eq 'sarah@example.com'`, `receivedDateTime ge 2026-01-01T00:00:00Z`, `hasAttachments eq true`. Combine with `and`/`or`. Prefer `search` for natural-language queries; use `filter` when you need exact field matching or date ranges. Leave both empty for most-recent messages. * [**Outlook get message**](./integrations-outlook/outlook-get-message) — `outlook_get_message`\ Fetch a single Outlook message with its full body (capped at 10 KB). Use `id` from `outlook_search`. If the message has attachments, returns their IDs and metadata. Use `outlook_get_attachment` to read attachment contents. * [**Outlook get conversation**](./integrations-outlook/outlook-get-conversation) — `outlook_get_conversation`\ Fetch all Outlook messages in a conversation, sorted chronologically, with full bodies (each capped at 5 KB). Pass the `conversationId` from `outlook_search` results. Returns attachment metadata for each message. Use `outlook_get_attachment` to read specific attachments. * [**Outlook get attachment**](./integrations-outlook/outlook-get-attachment) — `outlook_get_attachment`\ Download and read the content of an email attachment from Outlook. Requires the `messageId` and `attachmentId` from the attachments list returned by `outlook_get_message` or `outlook_get_conversation`. PDFs are extracted to text server-side. Text-based files (CSV, JSON, TXT, HTML, XML) are returned as text. All other formats (DOCX, XLSX, images, etc.) are returned as raw base64 for direct reading. * [**Outlook save attachments**](./integrations-outlook/outlook-save-attachments) — `outlook_save_attachments`\ Save an email's attachments into a HERO project folder as documents (PDF, Word .docx, images, video, audio), fetched directly from Outlook — nothing passes through you, so size is no obstacle. Use this to file client documents that arrived by email. Pick the project and folder first (search\_projects, list\_project\_tree; outlook\_get\_message to see the sender, subject and attachment names). Each saved document records the email it came from, so calling this again for the same message reports the files as alreadySaved instead of duplicating them. Unsupported types (Excel, ZIP, ...) come back under skipped with the reason. At most 10 attachments per call. * [**Outlook create draft**](./integrations-outlook/outlook-create-draft) — `outlook_create_draft`\ Create a draft email in the user's Outlook mailbox. The draft is saved but NOT sent — the user reviews and sends it themselves. Prefer this over `outlook_send_message` unless the instructions explicitly ask to send. * [**Outlook move message**](./integrations-outlook/outlook-move-message) — `outlook_move_message`\ Move an Outlook message to another mail folder. `destinationId` accepts a folder id or one of the well-known names `inbox`, `archive`, `deleteditems`, `junkemail`, `drafts`. Moving to `deleteditems` is recoverable. * [**Outlook send message**](./integrations-outlook/outlook-send-message) — `outlook_send_message`\ SEND an email from the user's Outlook account immediately. This cannot be undone. Only use this when the instructions explicitly ask to send; otherwise use `outlook_create_draft`. ## Integrations — OneDrive * [**Onedrive search**](./integrations-onedrive/onedrive-search) — `onedrive_search`\ Search the user's OneDrive for files by name and content. The query is a single free-text string — Graph matches it against filenames, content, and metadata. Returns file summaries (NOT content — follow up with `onedrive_get_file_content`). * [**Onedrive list folder**](./integrations-onedrive/onedrive-list-folder) — `onedrive_list_folder`\ List files and subfolders directly inside a OneDrive folder. Omit `folderId` to list the root. * [**Onedrive get file content**](./integrations-onedrive/onedrive-get-file-content) — `onedrive_get_file_content`\ Fetch the text content of a OneDrive file. Only text-like files (text/\*, json, xml, javascript) are supported. PDFs, Office docs, and binary formats return an error. Content is truncated to 15 KB. * [**Onedrive upload file**](./integrations-onedrive/onedrive-upload-file) — `onedrive_upload_file`\ Create or replace a file in the user's OneDrive with text content. Replacing a file keeps the previous version in OneDrive's version history, and a deleted file goes to the recycle bin — both are recoverable. * [**Onedrive create folder**](./integrations-onedrive/onedrive-create-folder) — `onedrive_create_folder`\ Create a folder in the user's OneDrive. Returns the folder id for use as a `parentId`. * [**Onedrive move item**](./integrations-onedrive/onedrive-move-item) — `onedrive_move_item`\ Move a OneDrive file or folder into a different folder, optionally renaming it. Pass `destinationParentId` from `onedrive_list_folder` or `onedrive_create_folder`. ## Integrations — Dropbox * [**Dropbox search**](./integrations-dropbox/dropbox-search) — `dropbox_search`\ Search the user's Dropbox by filename and (for supported text formats) content. Returns file/folder metadata. Follow up with `dropbox_get_file_content` for text content. * [**Dropbox list folder**](./integrations-dropbox/dropbox-list-folder) — `dropbox_list_folder`\ List files and subfolders inside a Dropbox path. Pass empty string for the Dropbox root. * [**Dropbox get file content**](./integrations-dropbox/dropbox-get-file-content) — `dropbox_get_file_content`\ Fetch the text content of a Dropbox file. Only text-like extensions are supported (txt, md, json, csv, log, yml, yaml, html, xml, common code files). PDFs and binary formats return an error. Content is truncated to 15 KB. `pathOrId` accepts either a Dropbox path (e.g. '/Documents/notes.md') or the file id from search results. * [**Dropbox upload file**](./integrations-dropbox/dropbox-upload-file) — `dropbox_upload_file`\ Upload a text file to the user's Dropbox. By default an existing file at the same path is left alone and the new file is auto-renamed; set `overwrite` to true to replace it, which Dropbox keeps in file revisions. * [**Dropbox create folder**](./integrations-dropbox/dropbox-create-folder) — `dropbox_create_folder`\ Create a folder in the user's Dropbox. Auto-renames rather than failing if the path is taken. * [**Dropbox move item**](./integrations-dropbox/dropbox-move-item) — `dropbox_move_item`\ Move or rename a file or folder in the user's Dropbox. Both paths are absolute; the destination includes the final name, so moving and renaming are the same operation. ## Integrations — Notion * [**Notion search**](./integrations-notion/notion-search) — `notion_search`\ Search the user's Notion workspace for pages and databases by TITLE. IMPORTANT: Notion's search only matches titles, NOT page content. To search content, use `notion_query_database` against a specific database. To read a page, use `notion_get_page`. * [**Notion get page**](./integrations-notion/notion-get-page) — `notion_get_page`\ Fetch a Notion page's full content. Walks the top-level blocks and flattens them to plain text. Content is truncated to 15 KB. Use `id` from `notion_search` results. * [**Notion query database**](./integrations-notion/notion-query-database) — `notion_query_database`\ Query a Notion database with optional filter and sort. Returns rows (each is a Notion page) with their property values. Use this when the user asks for structured data like 'employees with role = engineer' or 'tasks due this week'. Get the `databaseId` from `notion_search` with filter=database. The `filter` and `sorts` arguments follow Notion's database query DSL — pass them as JSON strings. See [https://developers.notion.com/reference/post-database-query](https://developers.notion.com/reference/post-database-query) for the full schema. * [**Notion create page**](./integrations-notion/notion-create-page) — `notion_create_page`\ Create a page in the user's Notion workspace, either inside a parent page or as a row in a database. Supply exactly one of `parentPageId` or `parentDatabaseId`. Body paragraphs are plain text. A created page can be archived later, so this is recoverable. * [**Notion append blocks**](./integrations-notion/notion-append-blocks) — `notion_append_blocks`\ Append plain-text paragraphs to the end of a Notion page. Existing content is never touched — this only adds. * [**Notion update page**](./integrations-notion/notion-update-page) — `notion_update_page`\ Update a Notion page's title, or archive/unarchive it. Archiving is Notion's delete and is reversible by unarchiving. To change a database row's other properties, pass `properties` in Notion's own property format. # Dropbox create folder Source: https://developers.myhero.so/mcp/tools/integrations-dropbox/dropbox-create-folder Create a folder in the user's Dropbox. Auto-renames rather than failing if the path is taken. `dropbox_create_folder` Create a folder in the user's Dropbox. Auto-renames rather than failing if the path is taken. ## Parameters **path** `string` *required* Absolute Dropbox path for the new folder, e.g. '/Reports/2026'. # Dropbox get file content Source: https://developers.myhero.so/mcp/tools/integrations-dropbox/dropbox-get-file-content Fetch the text content of a Dropbox file. Only text-like extensions are supported (txt, md, json, csv, log, yml, yaml, html, xml, common code files). PDFs… `dropbox_get_file_content` Fetch the text content of a Dropbox file. Only text-like extensions are supported (txt, md, json, csv, log, yml, yaml, html, xml, common code files). PDFs and binary formats return an error. Content is truncated to 15 KB. `pathOrId` accepts either a Dropbox path (e.g. '/Documents/notes.md') or the file id from search results. ## Parameters **pathOrId** `string` *required* # Dropbox list folder Source: https://developers.myhero.so/mcp/tools/integrations-dropbox/dropbox-list-folder List files and subfolders inside a Dropbox path. Pass empty string for the Dropbox root. `dropbox_list_folder` List files and subfolders inside a Dropbox path. Pass empty string for the Dropbox root. ## Parameters **path** `string` Dropbox path, e.g. '/Documents' or '' for root. **recursive** `boolean` If true, walk into subfolders. Default false. **limit** `integer` (default: 200) Minimum: 1. Maximum: 2000. # Dropbox move item Source: https://developers.myhero.so/mcp/tools/integrations-dropbox/dropbox-move-item Move or rename a file or folder in the user's Dropbox. Both paths are absolute; the destination includes the final name, so moving and renaming are the… `dropbox_move_item` Move or rename a file or folder in the user's Dropbox. Both paths are absolute; the destination includes the final name, so moving and renaming are the same operation. ## Parameters **fromPath** `string` *required* Current absolute path. **toPath** `string` *required* Destination absolute path, including the final name. # Dropbox search Source: https://developers.myhero.so/mcp/tools/integrations-dropbox/dropbox-search Search the user's Dropbox by filename and (for supported text formats) content. Returns file/folder metadata. Follow up with dropbox_get_file_content for… `dropbox_search` Search the user's Dropbox by filename and (for supported text formats) content. Returns file/folder metadata. Follow up with `dropbox_get_file_content` for text content. ## Parameters **query** `string` *required* Search term. Matches filenames and text content where indexed. **path** `string` Optional: restrict search to a folder path (e.g. '/Documents'). Empty string searches the whole Dropbox. **filenameOnly** `boolean` If true, only match filenames (not content). Default false. **limit** `integer` (default: 25) Minimum: 1. Maximum: 100. # Dropbox upload file Source: https://developers.myhero.so/mcp/tools/integrations-dropbox/dropbox-upload-file Upload a text file to the user's Dropbox. By default an existing file at the same path is left alone and the new file is auto-renamed; set overwrite to… `dropbox_upload_file` Upload a text file to the user's Dropbox. By default an existing file at the same path is left alone and the new file is auto-renamed; set `overwrite` to true to replace it, which Dropbox keeps in file revisions. ## Parameters **path** `string` *required* Absolute Dropbox path including filename, e.g. '/Reports/q3.txt'. **content** `string` *required* Text content of the file. **overwrite** `boolean` Replace an existing file at this path. Default false. # Gmail create draft Source: https://developers.myhero.so/mcp/tools/integrations-gmail/gmail-create-draft Create a draft email in the user's Gmail. The draft is saved but NOT sent — the user reviews and sends it themselves. Prefer this over gmail_send_message… `gmail_create_draft` Create a draft email in the user's Gmail. The draft is saved but NOT sent — the user reviews and sends it themselves. Prefer this over `gmail_send_message` unless the instructions explicitly ask for the mail to be sent. ## Parameters **to** `array\` *required* Recipient email addresses. **cc** `array\` Optional CC addresses. **bcc** `array\` Optional BCC addresses. **subject** `string` *required* Email subject line. **body** `string` *required* Plain-text email body. **threadId** `string` Optional Gmail thread id (from gmail\_search) to reply within an existing conversation. # Gmail get attachment Source: https://developers.myhero.so/mcp/tools/integrations-gmail/gmail-get-attachment Download and read the content of an email attachment from Gmail. Requires the messageId and attachmentId from the attachments list returned by… `gmail_get_attachment` Download and read the content of an email attachment from Gmail. Requires the `messageId` and `attachmentId` from the attachments list returned by `gmail_get_message` or `gmail_get_thread`. PDFs are extracted to text server-side. Text-based files (CSV, JSON, TXT, HTML, XML) are returned as text. All other formats (DOCX, XLSX, images, etc.) are returned as raw base64 for direct reading. ## Parameters **messageId** `string` *required* Gmail message ID that contains the attachment. **attachmentId** `string` *required* Attachment ID from the message's attachments list. **filename** `string` Original filename (from attachments list) — used for format detection. **mimeType** `string` MIME type of the attachment (from attachments list). # Gmail get message Source: https://developers.myhero.so/mcp/tools/integrations-gmail/gmail-get-message Fetch a single Gmail message with its full body text. Use the id returned by gmail_search. Returns headers, snippet, full plain-text body (capped at 10… `gmail_get_message` Fetch a single Gmail message with its full body text. Use the `id` returned by `gmail_search`. Returns headers, snippet, full plain-text body (capped at 10 KB), and a list of attachments with their IDs. Use `gmail_get_attachment` to read attachment contents, or `gmail_save_attachments` to file them into a HERO project. ## Parameters **id** `string` *required* Gmail message id (from gmail\_search results). # Gmail get thread Source: https://developers.myhero.so/mcp/tools/integrations-gmail/gmail-get-thread Fetch an entire Gmail conversation thread given a threadId (from gmail_search results). Returns all messages in the thread with their full plain-text… `gmail_get_thread` Fetch an entire Gmail conversation thread given a `threadId` (from `gmail_search` results). Returns all messages in the thread with their full plain-text bodies (each capped at 5 KB) and attachment metadata. Use `gmail_get_attachment` to read specific attachments. ## Parameters **threadId** `string` *required* Gmail thread id. # Gmail modify labels Source: https://developers.myhero.so/mcp/tools/integrations-gmail/gmail-modify-labels Add or remove Gmail labels on a message. Use the system label ids INBOX, UNREAD, STARRED, TRASH, or a custom label id. Removing UNREAD marks a message… `gmail_modify_labels` Add or remove Gmail labels on a message. Use the system label ids `INBOX`, `UNREAD`, `STARRED`, `TRASH`, or a custom label id. Removing `UNREAD` marks a message read; removing `INBOX` archives it. ## Parameters **id** `string` *required* Gmail message id (from gmail\_search). **addLabelIds** `array\` Label ids to add. **removeLabelIds** `array\` Label ids to remove. # Gmail save attachments Source: https://developers.myhero.so/mcp/tools/integrations-gmail/gmail-save-attachments Save an email's attachments into a HERO project folder as documents (PDF, Word .docx, images, video, audio), fetched directly from Gmail — nothing passes… `gmail_save_attachments` Save an email's attachments into a HERO project folder as documents (PDF, Word .docx, images, video, audio), fetched directly from Gmail — nothing passes through you, so size is no obstacle. Use this to file client documents that arrived by email. Pick the project and folder first (search\_projects, list\_project\_tree; gmail\_get\_message to see the sender, subject and attachment names). Each saved document records the email it came from, so calling this again for the same message reports the files as alreadySaved instead of duplicating them. Unsupported types (Excel, ZIP, ...) come back under skipped with the reason. At most 10 attachments per call. ## Parameters **messageId** `string` *required* Gmail message id (from the trigger payload or a search/get call). **projectId** `string` Project to file the attachments in. **parentId** `string` Folder to file them under (from list\_project\_tree). Omit for the project root. **filenames** `array\` Only these attachments (exact filenames). Omit to save every real attachment — inline images such as signature logos are skipped. # Gmail search Source: https://developers.myhero.so/mcp/tools/integrations-gmail/gmail-search Search the user's Gmail using Gmail's native query syntax. Returns message headers + snippets (NOT full bodies). Gmail query examples: … `gmail_search` Search the user's Gmail using Gmail's native query syntax. Returns message headers + snippets (NOT full bodies). Gmail query examples: - `from:sarah@example.com` — messages from Sarah - `subject:invoice newer_than:7d` — invoices from the last week - `has:attachment filename:pdf` — PDFs - `label:inbox is:unread` — unread inbox items - `in:sent to:bob@example.com` — mail I sent to Bob - Leave `query` empty to list the most recent messages. Follow up with `gmail_get_message` or `gmail_get_thread` to fetch full bodies. ## Parameters **query** `string` Gmail search query. Use the operators listed in the tool description. Empty string = most recent messages. **limit** `integer` (default: 10) Max number of messages to return (1-25). Minimum: 1. Maximum: 25. # Gmail send message Source: https://developers.myhero.so/mcp/tools/integrations-gmail/gmail-send-message SEND an email from the user's Gmail account immediately. This cannot be undone. Only use this when the instructions explicitly ask to send; otherwise use… `gmail_send_message` SEND an email from the user's Gmail account immediately. This cannot be undone. Only use this when the instructions explicitly ask to send; otherwise use `gmail_create_draft`. ## Parameters **to** `array\` *required* Recipient email addresses. **cc** `array\` Optional CC addresses. **bcc** `array\` Optional BCC addresses. **subject** `string` *required* Email subject line. **body** `string` *required* Plain-text email body. **threadId** `string` Optional Gmail thread id (from gmail\_search) to reply within an existing conversation. # Drive create file Source: https://developers.myhero.so/mcp/tools/integrations-google-drive/drive-create-file Create a new file in the user's Google Drive with text content. Returns the file id and a link. HERO can only later modify files it created itself. `drive_create_file` Create a new file in the user's Google Drive with text content. Returns the file id and a link. HERO can only later modify files it created itself. ## Parameters **name** `string` *required* File name including extension (e.g. 'summary.txt'). **content** `string` *required* Text content of the file. **mimeType** `string` MIME type. Default text/plain. **parentId** `string` Optional parent folder id. Defaults to My Drive root. # Drive create folder Source: https://developers.myhero.so/mcp/tools/integrations-google-drive/drive-create-folder Create a folder in the user's Google Drive. Returns the folder id for use as a parentId. `drive_create_folder` Create a folder in the user's Google Drive. Returns the folder id for use as a `parentId`. ## Parameters **name** `string` *required* Folder name. **parentId** `string` Optional parent folder id. Defaults to My Drive root. # Drive get file content Source: https://developers.myhero.so/mcp/tools/integrations-google-drive/drive-get-file-content Fetch the text content of a Drive file. Native Google Docs/Sheets/Slides are exported to plain text/CSV. Text files are fetched directly. PDFs and binary… `drive_get_file_content` Fetch the text content of a Drive file. Native Google Docs/Sheets/Slides are exported to plain text/CSV. Text files are fetched directly. PDFs and binary formats return an error — the model cannot read them. Content is truncated to 15 KB. ## Parameters **id** `string` *required* Drive file id. # Drive list folder Source: https://developers.myhero.so/mcp/tools/integrations-google-drive/drive-list-folder List files and subfolders directly inside a Google Drive folder. Pass the folder's id, or omit folderId to list the root. `drive_list_folder` List files and subfolders directly inside a Google Drive folder. Pass the folder's id, or omit `folderId` to list the root. ## Parameters **folderId** `string` Drive folder id. Omit or use 'root' for the root folder. **limit** `integer` (default: 50) Minimum: 1. Maximum: 100. # Drive move file Source: https://developers.myhero.so/mcp/tools/integrations-google-drive/drive-move-file Move a Google Drive file HERO created into a different folder. Call drive_search first if you need the file's current parent — Drive requires the folder… `drive_move_file` Move a Google Drive file HERO created into a different folder. Call `drive_search` first if you need the file's current parent — Drive requires the folder being left as well as the one being joined. ## Parameters **fileId** `string` *required* Drive file id. **addParentId** `string` *required* Destination folder id. **removeParentId** `string` Current parent folder id to detach from. # Drive search Source: https://developers.myhero.so/mcp/tools/integrations-google-drive/drive-search Search the user's Google Drive using Drive's native query syntax. Returns file metadata only (no content — follow up with drive_get_file_content). Drive… `drive_search` Search the user's Google Drive using Drive's native query syntax. Returns file metadata only (no content — follow up with `drive_get_file_content`). Drive query examples: - `name contains 'invoice'` — name substring - `fullText contains 'Q4 planning'` — full-text search of doc contents - `mimeType = 'application/pdf'` — only PDFs - `mimeType = 'application/vnd.google-apps.document'` — only native Google Docs - `modifiedTime > '2026-01-01T00:00:00'` — modified after a date - `'alice@example.com' in owners` — owned by Alice - Combine with `and` / `or`: `name contains 'invoice' and mimeType = 'application/pdf'` The tool automatically appends `trashed = false` to every query. Leave `query` empty to list the most recently-modified files. ## Parameters **query** `string` Google Drive query string. See examples in the tool description. Empty string = list most recently modified. **limit** `integer` (default: 20) Minimum: 1. Maximum: 50. # Drive update file Source: https://developers.myhero.so/mcp/tools/integrations-google-drive/drive-update-file Replace the text content of a Google Drive file HERO created. Drive keeps the previous revision, so this is recoverable from the file's version history… `drive_update_file` Replace the text content of a Google Drive file HERO created. Drive keeps the previous revision, so this is recoverable from the file's version history. Fails with 403 on files HERO did not create. ## Parameters **fileId** `string` *required* Drive file id. **content** `string` *required* New full text content — replaces what is there. **mimeType** `string` MIME type of the new content. Default text/plain. # Notion append blocks Source: https://developers.myhero.so/mcp/tools/integrations-notion/notion-append-blocks Append plain-text paragraphs to the end of a Notion page. Existing content is never touched — this only adds. `notion_append_blocks` Append plain-text paragraphs to the end of a Notion page. Existing content is never touched — this only adds. ## Parameters **pageId** `string` *required* Notion page id (from notion\_search or notion\_get\_page). **paragraphs** `array\` *required* Paragraphs to append, plain text. # Notion create page Source: https://developers.myhero.so/mcp/tools/integrations-notion/notion-create-page Create a page in the user's Notion workspace, either inside a parent page or as a row in a database. Supply exactly one of parentPageId or… `notion_create_page` Create a page in the user's Notion workspace, either inside a parent page or as a row in a database. Supply exactly one of `parentPageId` or `parentDatabaseId`. Body paragraphs are plain text. A created page can be archived later, so this is recoverable. ## Parameters **title** `string` *required* Page title. **parentPageId** `string` Id of the parent page (from notion\_search). **parentDatabaseId** `string` Id of the parent database — creates a row. **paragraphs** `array\` Body paragraphs, plain text. # Notion get page Source: https://developers.myhero.so/mcp/tools/integrations-notion/notion-get-page Fetch a Notion page's full content. Walks the top-level blocks and flattens them to plain text. Content is truncated to 15 KB. Use id from notion_search… `notion_get_page` Fetch a Notion page's full content. Walks the top-level blocks and flattens them to plain text. Content is truncated to 15 KB. Use `id` from `notion_search` results. ## Parameters **id** `string` *required* Notion page id. # Notion query database Source: https://developers.myhero.so/mcp/tools/integrations-notion/notion-query-database Query a Notion database with optional filter and sort. Returns rows (each is a Notion page) with their property values. Use this when the user asks for… `notion_query_database` Query a Notion database with optional filter and sort. Returns rows (each is a Notion page) with their property values. Use this when the user asks for structured data like 'employees with role = engineer' or 'tasks due this week'. Get the `databaseId` from `notion_search` with filter=database. The `filter` and `sorts` arguments follow Notion's database query DSL — pass them as JSON strings. See [https://developers.notion.com/reference/post-database-query](https://developers.notion.com/reference/post-database-query) for the full schema. ## Parameters **databaseId** `string` *required* **filter** `string` Notion filter object as a JSON string. Example: '\{"property":"Status","select":\{"equals":"Done"}}'. Omit for no filter. **sorts** `string` Notion sorts array as a JSON string. Example: '\[\{"property":"Name","direction":"ascending"}]'. **limit** `integer` (default: 25) Minimum: 1. Maximum: 100. # Notion search Source: https://developers.myhero.so/mcp/tools/integrations-notion/notion-search Search the user's Notion workspace for pages and databases by TITLE. IMPORTANT: Notion's search only matches titles, NOT page content. To search content… `notion_search` Search the user's Notion workspace for pages and databases by TITLE. IMPORTANT: Notion's search only matches titles, NOT page content. To search content, use `notion_query_database` against a specific database. To read a page, use `notion_get_page`. ## Parameters **query** `string` Title search term. Empty string lists the most recently edited pages and databases. **filter** `string, enum: 'page' | 'database' | 'any'` (default: any) Restrict results to pages, databases, or both. **limit** `integer` (default: 20) Minimum: 1. Maximum: 50. # Notion update page Source: https://developers.myhero.so/mcp/tools/integrations-notion/notion-update-page Update a Notion page's title, or archive/unarchive it. Archiving is Notion's delete and is reversible by unarchiving. To change a database row's other… `notion_update_page` Update a Notion page's title, or archive/unarchive it. Archiving is Notion's delete and is reversible by unarchiving. To change a database row's other properties, pass `properties` in Notion's own property format. ## Parameters **pageId** `string` *required* Notion page id. **title** `string` Optional new title. **archived** `boolean` Set true to archive, false to restore. **properties** `object` Optional raw Notion properties patch, merged over the title change. # Onedrive create folder Source: https://developers.myhero.so/mcp/tools/integrations-onedrive/onedrive-create-folder Create a folder in the user's OneDrive. Returns the folder id for use as a parentId. `onedrive_create_folder` Create a folder in the user's OneDrive. Returns the folder id for use as a `parentId`. ## Parameters **name** `string` *required* Folder name. **parentId** `string` Optional parent folder id. Defaults to the drive root. # Onedrive get file content Source: https://developers.myhero.so/mcp/tools/integrations-onedrive/onedrive-get-file-content Fetch the text content of a OneDrive file. Only text-like files (text/*, json, xml, javascript) are supported. PDFs, Office docs, and binary formats… `onedrive_get_file_content` Fetch the text content of a OneDrive file. Only text-like files (text/\*, json, xml, javascript) are supported. PDFs, Office docs, and binary formats return an error. Content is truncated to 15 KB. ## Parameters **id** `string` *required* OneDrive item id. # Onedrive list folder Source: https://developers.myhero.so/mcp/tools/integrations-onedrive/onedrive-list-folder List files and subfolders directly inside a OneDrive folder. Omit folderId to list the root. `onedrive_list_folder` List files and subfolders directly inside a OneDrive folder. Omit `folderId` to list the root. ## Parameters **folderId** `string` OneDrive folder id. Omit for the root folder. **limit** `integer` (default: 50) Minimum: 1. Maximum: 100. # Onedrive move item Source: https://developers.myhero.so/mcp/tools/integrations-onedrive/onedrive-move-item Move a OneDrive file or folder into a different folder, optionally renaming it. Pass destinationParentId from onedrive_list_folder or… `onedrive_move_item` Move a OneDrive file or folder into a different folder, optionally renaming it. Pass `destinationParentId` from `onedrive_list_folder` or `onedrive_create_folder`. ## Parameters **itemId** `string` *required* OneDrive item id. **destinationParentId** `string` *required* Target folder id. **newName** `string` Optional new name for the item. # Onedrive search Source: https://developers.myhero.so/mcp/tools/integrations-onedrive/onedrive-search Search the user's OneDrive for files by name and content. The query is a single free-text string — Graph matches it against filenames, content, and… `onedrive_search` Search the user's OneDrive for files by name and content. The query is a single free-text string — Graph matches it against filenames, content, and metadata. Returns file summaries (NOT content — follow up with `onedrive_get_file_content`). ## Parameters **query** `string` *required* Free-text search term. Matches filenames, content (for indexed file types), and metadata. **limit** `integer` (default: 25) Minimum: 1. Maximum: 50. # Onedrive upload file Source: https://developers.myhero.so/mcp/tools/integrations-onedrive/onedrive-upload-file Create or replace a file in the user's OneDrive with text content. Replacing a file keeps the previous version in OneDrive's version history, and a… `onedrive_upload_file` Create or replace a file in the user's OneDrive with text content. Replacing a file keeps the previous version in OneDrive's version history, and a deleted file goes to the recycle bin — both are recoverable. ## Parameters **name** `string` *required* File name including extension. **content** `string` *required* Text content of the file. **parentId** `string` Optional parent folder id. Defaults to the drive root. **mimeType** `string` MIME type. Default text/plain. # Outlook create draft Source: https://developers.myhero.so/mcp/tools/integrations-outlook/outlook-create-draft Create a draft email in the user's Outlook mailbox. The draft is saved but NOT sent — the user reviews and sends it themselves. Prefer this over… `outlook_create_draft` Create a draft email in the user's Outlook mailbox. The draft is saved but NOT sent — the user reviews and sends it themselves. Prefer this over `outlook_send_message` unless the instructions explicitly ask to send. ## Parameters **to** `array\` *required* Recipient email addresses. **cc** `array\` Optional CC addresses. **bcc** `array\` Optional BCC addresses. **subject** `string` *required* Email subject line. **body** `string` *required* Plain-text email body. # Outlook get attachment Source: https://developers.myhero.so/mcp/tools/integrations-outlook/outlook-get-attachment Download and read the content of an email attachment from Outlook. Requires the messageId and attachmentId from the attachments list returned by… `outlook_get_attachment` Download and read the content of an email attachment from Outlook. Requires the `messageId` and `attachmentId` from the attachments list returned by `outlook_get_message` or `outlook_get_conversation`. PDFs are extracted to text server-side. Text-based files (CSV, JSON, TXT, HTML, XML) are returned as text. All other formats (DOCX, XLSX, images, etc.) are returned as raw base64 for direct reading. ## Parameters **messageId** `string` *required* Outlook message ID that contains the attachment. **attachmentId** `string` *required* Attachment ID from the message's attachments list. # Outlook get conversation Source: https://developers.myhero.so/mcp/tools/integrations-outlook/outlook-get-conversation Fetch all Outlook messages in a conversation, sorted chronologically, with full bodies (each capped at 5 KB). Pass the conversationId from outlook_search… `outlook_get_conversation` Fetch all Outlook messages in a conversation, sorted chronologically, with full bodies (each capped at 5 KB). Pass the `conversationId` from `outlook_search` results. Returns attachment metadata for each message. Use `outlook_get_attachment` to read specific attachments. ## Parameters **conversationId** `string` *required* # Outlook get message Source: https://developers.myhero.so/mcp/tools/integrations-outlook/outlook-get-message Fetch a single Outlook message with its full body (capped at 10 KB). Use id from outlook_search. If the message has attachments, returns their IDs and… `outlook_get_message` Fetch a single Outlook message with its full body (capped at 10 KB). Use `id` from `outlook_search`. If the message has attachments, returns their IDs and metadata. Use `outlook_get_attachment` to read attachment contents. ## Parameters **id** `string` *required* # Outlook move message Source: https://developers.myhero.so/mcp/tools/integrations-outlook/outlook-move-message Move an Outlook message to another mail folder. destinationId accepts a folder id or one of the well-known names inbox, archive, deleteditems, junkemail… `outlook_move_message` Move an Outlook message to another mail folder. `destinationId` accepts a folder id or one of the well-known names `inbox`, `archive`, `deleteditems`, `junkemail`, `drafts`. Moving to `deleteditems` is recoverable. ## Parameters **id** `string` *required* Outlook message id (from outlook\_search). **destinationId** `string` *required* Target folder id or well-known folder name. # Outlook save attachments Source: https://developers.myhero.so/mcp/tools/integrations-outlook/outlook-save-attachments Save an email's attachments into a HERO project folder as documents (PDF, Word .docx, images, video, audio), fetched directly from Outlook — nothing… `outlook_save_attachments` Save an email's attachments into a HERO project folder as documents (PDF, Word .docx, images, video, audio), fetched directly from Outlook — nothing passes through you, so size is no obstacle. Use this to file client documents that arrived by email. Pick the project and folder first (search\_projects, list\_project\_tree; outlook\_get\_message to see the sender, subject and attachment names). Each saved document records the email it came from, so calling this again for the same message reports the files as alreadySaved instead of duplicating them. Unsupported types (Excel, ZIP, ...) come back under skipped with the reason. At most 10 attachments per call. ## Parameters **messageId** `string` *required* Outlook message id (from the trigger payload or a search/get call). **projectId** `string` Project to file the attachments in. **parentId** `string` Folder to file them under (from list\_project\_tree). Omit for the project root. **filenames** `array\` Only these attachments (exact filenames). Omit to save every real attachment — inline images such as signature logos are skipped. # Outlook search Source: https://developers.myhero.so/mcp/tools/integrations-outlook/outlook-search Search the user's Outlook / Microsoft 365 mailbox via Microsoft Graph. Returns message headers + snippets (not full bodies — follow up with… `outlook_search` Search the user's Outlook / Microsoft 365 mailbox via Microsoft Graph. Returns message headers + snippets (not full bodies — follow up with `outlook_get_message`). Two modes: - `search` (free-text, KQL-like): `subject:invoice`, `from:sarah@example.com`, `hasattachment:yes`, `received:2026-01-01..2026-01-31`. Combine with spaces. - `filter` (OData, precise): `from/emailAddress/address eq 'sarah@example.com'`, `receivedDateTime ge 2026-01-01T00:00:00Z`, `hasAttachments eq true`. Combine with `and`/`or`. Prefer `search` for natural-language queries; use `filter` when you need exact field matching or date ranges. Leave both empty for most-recent messages. ## Parameters **search** `string` KQL-like free-text search. e.g. `subject:invoice from:sarah@example.com`. Mutually exclusive with `filter`. **filter** `string` OData filter expression. e.g. `from/emailAddress/address eq 'sarah@example.com' and hasAttachments eq true`. **limit** `integer` (default: 15) Minimum: 1. Maximum: 50. # Outlook send message Source: https://developers.myhero.so/mcp/tools/integrations-outlook/outlook-send-message SEND an email from the user's Outlook account immediately. This cannot be undone. Only use this when the instructions explicitly ask to send; otherwise… `outlook_send_message` SEND an email from the user's Outlook account immediately. This cannot be undone. Only use this when the instructions explicitly ask to send; otherwise use `outlook_create_draft`. ## Parameters **to** `array\` *required* Recipient email addresses. **cc** `array\` Optional CC addresses. **bcc** `array\` Optional BCC addresses. **subject** `string` *required* Email subject line. **body** `string` *required* Plain-text email body. # Build document map Source: https://developers.myhero.so/mcp/tools/knowledge/build-document-map Map a document's structure without reading all of it: its clause sections (numbering, title, depth, content) and its defined terms. Pass depth for just… `build_document_map` Map a document's structure without reading all of it: its clause `sections` (numbering, title, depth, content) and its defined `terms`. Pass `depth` for just the numbers and titles at one level, a table of contents. Sections are paged (up to 100 per call); `terms` come with the first page. Paged: when the result's page.nextOffset is present, more remains — pass page.nextOffset as `offset` to continue. ## Parameters **documentId** `string` *required* **depth** `integer` Only the sections at this depth (0 = top level), as numbering and title. Minimum: 0. **offset** `integer` Where to start. Pass the previous result's page.nextOffset. Minimum: 0. **limit** `integer` How many to return at most; the result may hold fewer to fit. Minimum: 1. # Create clause reference Source: https://developers.myhero.so/mcp/tools/knowledge/create-clause-reference A live link to a clause in another document, to write as . Pass the document that holds the clause and the clause's full number as a reader cites it… `create_clause_reference` A live link to a clause in another document, to write as \{\{clauseRef:ID}}. Pass the document that holds the clause and the clause's full number as a reader cites it ("2.2", "4.1(a)"); the result's clauseReferenceId is the ID. It shows only the clause's number, so the sentence names the document: "Section \{\{clauseRef:ID}} of the \{\{doc:DOCUMENT\_ID}}". A clause in the document you are writing needs none: write "Section 2" as prose and it is linked when the document is written. ## Parameters **documentId** `string` *required* ID of the document that CONTAINS the target clause. **numbering** `string` The clause's full number as a reader cites it: "2.2", "3", "4.1(a)". **blockId** `string` Instead of numbering: the target clause block's id (attrs.id), with its hierarchy. **hierarchy** `string` With blockId: the clause's hierarchy as the document holds it (attrs.hierarchy), e.g. "1.2". # Explain term definition Source: https://developers.myhero.so/mcp/tools/knowledge/explain-term-definition Explain a defined term (e.g. "Party", "Effective Date") in a specific document. Returns the definition content. `explain_term_definition` Explain a defined term (e.g. "Party", "Effective Date") in a specific document. Returns the definition content. ## Parameters **documentId** `string` *required* **term** `string` *required* The term to look up. # Get document maps Source: https://developers.myhero.so/mcp/tools/knowledge/get-document-maps Build document maps (sections + terms) for the documents in a project, sorted by name. Useful for cross-document search. Returns documents ( ) and page… `get_document_maps` Build document maps (sections + terms) for the documents in a project, sorted by name. Useful for cross-document search. Returns `documents` (\{\_id, name, map}) and `page`; maps are built only for the requested page, 10 documents by default (max 50). Paged: when the result's page.nextOffset is present, more remains — pass page.nextOffset as `offset` to continue. To find documents by name, search\_documents or list\_project\_documents is far cheaper. ## Parameters **projectId** `string` **offset** `integer` Where to start. Pass the previous result's page.nextOffset. Minimum: 0. **limit** `integer` Documents per page (default 10, max 50). Minimum: 1. Maximum: 50. # Get document metadata Source: https://developers.myhero.so/mcp/tools/knowledge/get-document-metadata Get metadata for a specific document: name, type, description, collaborators, timestamps, parent folder, published status. `get_document_metadata` Get metadata for a specific document: name, type, description, collaborators, timestamps, parent folder, published status. ## Parameters **documentId** `string` *required* The document ID to look up. # Get table schema Source: https://developers.myhero.so/mcp/tools/knowledge/get-table-schema Get a table's columns by its ID or its name: each column's id, name, type, select option labels, linked table for relations, and which column is the… `get_table_schema` Get a table's columns by its ID or its name: each column's id, name, type, select option labels, linked table for relations, and which column is the identifier (row label / primary key). ## Parameters **tableId** `string` **tableName** `string` The table's name, when you lack its id; matched within the project. **projectId** `string` Project to find tableName in. Falls back to context projectId. # List project documents Source: https://developers.myhero.so/mcp/tools/knowledge/list-project-documents List the documents (files, subfiles, and external PDFs) in a project, sorted by name. Returns documents (name, id, type, externalType e.g. 'PDF', and… `list_project_documents` List the documents (files, subfiles, and external PDFs) in a project, sorted by name. Returns `documents` (name, id, type, externalType e.g. 'PDF', and reference e.g. 'Schedule A') and `page`, up to 300 per call. Paged: when the result's page.nextOffset is present, more remains — pass page.nextOffset as `offset` to continue. ## Parameters **projectId** `string` Project ID. Falls back to context projectId if omitted. **offset** `integer` Where to start. Pass the previous result's page.nextOffset. Minimum: 0. **limit** `integer` How many to return at most; the result may hold fewer to fit. Minimum: 1. # Read document text Source: https://developers.myhero.so/mcp/tools/knowledge/read-document-text Read a document as plain text: a HERO editor document (with its clause numbering and headings), a PDF (the server extracts its text; it is the only way to… `read_document_text` Read a document as plain text: a HERO editor document (with its clause numbering and headings), a PDF (the server extracts its text; it is the only way to read one), or a file attached to this chat message (attachmentFilename). Pass `section` to read one clause and what sits under it instead of the whole document. Returns at most 40000 characters per call with a `page` object (\{offset, returned, total, nextOffset?}). Paged: when the result's page.nextOffset is present, more remains — pass page.nextOffset as `offset` to continue. ## Parameters **documentId** `string` The document ID. Falls back to context documentId if omitted. **section** `string` A clause number, e.g. "2.2" or "22", to read just that clause. **attachmentFilename** `string` Filename of a file attached to this chat message, to page through its text. **offset** `integer` Character to start at. Pass the previous result's page.nextOffset. Minimum: 0. **limit** `integer` Max characters to return (default and max 40000). Minimum: 1. Maximum: 40000. **maxLength** `integer` Deprecated alias for limit. Minimum: 1. # Lookup table rows Source: https://developers.myhero.so/mcp/tools/placeholders/lookup-table-rows Find records (rows) in a table and their rowIds, a page at a time. Rows come back in table order, each with its identifier (primary key) value and a… `lookup_table_rows` Find records (rows) in a table and their rowIds, a page at a time. Rows come back in table order, each with its identifier (primary key) value and a preview of the first few columns. Without `query`, rowIndex is the row's position in the table (1-based), so 'the 2nd row' is rowIndex 2. With `query`, only rows whose identifier contains that text (case-insensitive) are returned, e.g. 'David Smith'. The result's `page` says how many rows there are; pass page.nextOffset to continue. ## Parameters **tableId** `string` *required* The ID of the table to look up rows in. **query** `string` Optional: text the row's identifier value must contain (case-insensitive). **offset** `integer` Where to start. Pass the previous result's page.nextOffset. Minimum: 0. **limit** `integer` How many to return at most; the result may hold fewer to fit. Minimum: 1. # Prepare global references Source: https://developers.myhero.so/mcp/tools/placeholders/prepare-global-references Create GLOBAL references (globalReferenceNode) pinned to ONE SPECIFIC row. Use this when a document must reference MULTIPLE DIFFERENT rows of the same… `prepare_global_references` Create GLOBAL references (globalReferenceNode) pinned to ONE SPECIFIC row. Use this when a document must reference MULTIPLE DIFFERENT rows of the same table at once (e.g. Alice's email AND Bob's email, a roster, a comparison). Each reference is locked to the rowId you pass and is independent of the document's active row, so different references can point to different rows. Call lookup\_table\_rows first to get the rowId. Returns a mapping of columnId to tableReferenceId to use on globalReferenceNode nodes (markdown: \{\{globalref:ID}}). For the common case where ALL placeholders should share one row that the user can switch later, use prepare\_placeholder\_references instead. For a document you just created, pass its documentId. ## Parameters **tableId** `string` *required* The ID of the table whose columns you want to reference. **columnIds** `array\` *required* Array of column IDs to create global references for (all pinned to the same rowId). **rowId** `string` *required* Required. The specific row to pin these references to. Obtain from lookup\_table\_rows. **documentId** `string` The target document ID. Required when no document is open in context. Falls back to the context documentId if omitted. # Prepare placeholder references Source: https://developers.myhero.so/mcp/tools/placeholders/prepare-placeholder-references Get the IDs for : a tableReferenceId per column, before you write the content that uses them. Every standard placeholder for a table shows the document's… `prepare_placeholder_references` Get the IDs for \{\{placeholder:ID}}: a tableReferenceId per column, before you write the content that uses them. Every standard placeholder for a table shows the document's one row of it, so switching that row changes them all; to show several rows of the same table at once (A compared with B, a roster), use prepare\_global\_references. For a document you just created, pass its documentId. ## Parameters **tableId** `string` *required* The ID of the table whose columns you want to reference. **columnIds** `array\` *required* Array of column IDs to create references for. **rowId** `string` Optional. If the user wants to link to a specific row, pass the row ID here. All placeholders will then show that row's values. **documentId** `string` The target document ID. Required when no document is open in context (e.g. after creating a new document via create\_document). Falls back to the context documentId if omitted. # Update referenced row Source: https://developers.myhero.so/mcp/tools/placeholders/update-referenced-row Change which row the placeholders display for a given table in a document. Updates the ReferencedRowInDocument link so all existing placeholderNode nodes… `update_referenced_row` Change which row the placeholders display for a given table in a document. Updates the ReferencedRowInDocument link so all existing placeholderNode nodes for that table show the new row's values. Use when the user wants to switch which record the placeholders point to. ## Parameters **tableId** `string` *required* The ID of the table whose row link to update. **rowId** `string` *required* The ID of the row to link to. Obtain this from lookup\_table\_rows. **documentId** `string` The target document ID. Required when no document is open in context. # Copy documents to Source: https://developers.myhero.so/mcp/tools/project-tree/copy-documents-to Copy one or more documents/folders into a specific destination folder (or project root). Folders are copied recursively — every nested document and… `copy_documents_to` Copy one or more documents/folders into a specific destination folder (or project root). Folders are copied recursively — every nested document and subfolder is included. The copies get fresh IDs but keep the same content, tables, and references. ## Parameters **documentIds** `array\` *required* IDs of documents/folders to copy. Folder children are pulled in automatically. **destinationFolderId** `string` Target folder ID to copy into. Omit or pass the projectId to copy into the project root. **destinationProjectId** `string` Target project ID. Defaults to the current project context. # Create document Source: https://developers.myhero.so/mcp/tools/project-tree/create-document Create a new document (file) or folder in a project. Set type to "FOLDER" for folders, "FILE" for documents. Before writing content into a new document… `create_document` Create a new document (file) or folder in a project. Set type to "FOLDER" for folders, "FILE" for documents. Before writing content into a new document, know the project's tables and documents: the Project outline has them (in your context, or from `get_project_outline`), else `list_project_tables` and `list_project_documents`. A project with tables expects its documents to read from them through `prepare_placeholder_references` rather than repeating the data as text; a static document in a project built to be data-driven looks fine and quietly isn't. When the user names a document to follow, read it first. ## Parameters **name** `string` *required* Document or folder name. Title Case words as a reader would say them: "Employment Contract", "John Doe". Never a filename with underscores or an extension; the party goes in a folder named after them, the numbering in reference. **type** `string, enum: 'FILE' | 'FOLDER'` (default: FILE) Node type: "FILE" or "FOLDER". **parentId** `string` Parent folder ID. Omit for project root level. **projectId** `string` **description** `string` Optional document description. **reference** `string` Short tag shown beside the name in the tree, for the numbering or kind the name must not carry: "Appendix 1", "Schedule A", "Exhibit B". Omit when there is nothing to number. # Create document batch Source: https://developers.myhero.so/mcp/tools/project-tree/create-document-batch Create multiple documents/folders in one operation. Useful for scaffolding a project structure. Items are created in order so you can reference earlier… `create_document_batch` Create multiple documents/folders in one operation. Useful for scaffolding a project structure. Items are created in order so you can reference earlier items as parents by using a temporary id pattern. ## Parameters **projectId** `string` **items** `array\` *required* Array of documents to create. # Create project Source: https://developers.myhero.so/mcp/tools/project-tree/create-project Create a new project in the current workspace. `create_project` Create a new project in the current workspace. ## Parameters **name** `string` *required* Project name. **description** `string` Optional project description. # Delete documents Source: https://developers.myhero.so/mcp/tools/project-tree/delete-documents Delete one or more documents/folders (and their children). THIS IS DESTRUCTIVE — only call after confirming with the user. `delete_documents` Delete one or more documents/folders (and their children). THIS IS DESTRUCTIVE — only call after confirming with the user. ## Parameters **documentIds** `array\` *required* IDs of documents/folders to delete. **confirmDelete** `boolean` *required* Must be true. Set to true only after you have confirmed with the user. # Delete project Source: https://developers.myhero.so/mcp/tools/project-tree/delete-project Delete an entire project and all its documents. THIS IS DESTRUCTIVE — only call after confirming with the user. `delete_project` Delete an entire project and all its documents. THIS IS DESTRUCTIVE — only call after confirming with the user. ## Parameters **projectId** `string` *required* **confirmDelete** `boolean` *required* Must be true. Set to true only after you have confirmed with the user. # Duplicate documents Source: https://developers.myhero.so/mcp/tools/project-tree/duplicate-documents Duplicate one or more documents/folders in place (same parent, same project). Folders are duplicated recursively — every nested document and subfolder is… `duplicate_documents` Duplicate one or more documents/folders in place (same parent, same project). Folders are duplicated recursively — every nested document and subfolder is copied. Each copy gets a fresh ID but keeps the same content, tables, and references. ## Parameters **documentIds** `array\` *required* IDs of documents/folders to duplicate. Folder children are pulled in automatically. # List project tree Source: https://developers.myhero.so/mcp/tools/project-tree/list-project-tree Get a project's document tree: folders and files with their parent-child relationships, depth-first. Returns id, name, type, parentId, createdAt… `list_project_tree` Get a project's document tree: folders and files with their parent-child relationships, depth-first. Returns id, name, type, parentId, createdAt, updatedAt for each node. Pass folderId to list one folder's subtree and depth to limit the levels (1 = direct children only). The result's `page` says how many nodes there are; pass page.nextOffset to continue. ## Parameters **projectId** `string` **folderId** `string` List only this folder's contents, not the folder itself. **depth** `integer` How many levels to descend. Omit for all. Minimum: 1. **offset** `integer` Where to start. Pass the previous result's page.nextOffset. Minimum: 0. **limit** `integer` How many to return at most; the result may hold fewer to fit. Minimum: 1. # List user workspaces Source: https://developers.myhero.so/mcp/tools/project-tree/list-user-workspaces List all workspaces the current user has access to. Returns each workspace's id, name, and metadata. Use this when the user asks about their workspaces or… `list_user_workspaces` List all workspaces the current user has access to. Returns each workspace's id, name, and metadata. Use this when the user asks about their workspaces or when you need a workspaceId for other tools. ## Parameters *This tool takes no parameters.* # List workspace projects Source: https://developers.myhero.so/mcp/tools/project-tree/list-workspace-projects List the projects in a workspace with their names, ids, and timestamps, by name. The result's page says how many there are; pass page.nextOffset to… `list_workspace_projects` List the projects in a workspace with their names, ids, and timestamps, by name. The result's `page` says how many there are; pass page.nextOffset to continue. ## Parameters **workspaceId** `string` **offset** `integer` Where to start. Pass the previous result's page.nextOffset. Minimum: 0. **limit** `integer` How many to return at most; the result may hold fewer to fit. Minimum: 1. # Move document Source: https://developers.myhero.so/mcp/tools/project-tree/move-document Move a document or folder to a different parent. Omit newParentId to move to project root. `move_document` Move a document or folder to a different parent. Omit newParentId to move to project root. ## Parameters **documentId** `string` *required* **projectId** `string` **newParentId** `string` Target folder ID. Omit to move to project root. # Move document batch Source: https://developers.myhero.so/mcp/tools/project-tree/move-document-batch Move multiple documents/folders in one operation. Provide a shared newParentId to move all items to the same folder, or specify a per-item newParentId to… `move_document_batch` Move multiple documents/folders in one operation. Provide a shared newParentId to move all items to the same folder, or specify a per-item newParentId to move each to a different destination. Omit newParentId (both shared and per-item) to move to project root. ## Parameters **projectId** `string` **newParentId** `string` Default destination folder ID applied to every item that doesn't specify its own. Omit to move to project root. **items** `array\` *required* Documents/folders to move. # Rename document Source: https://developers.myhero.so/mcp/tools/project-tree/rename-document Rename a document or folder. Names are Title Case words as a reader would say them ("Scope of Work"); a numbering prefix such as "Appendix 1" is a… `rename_document` Rename a document or folder. Names are Title Case words as a reader would say them ("Scope of Work"); a numbering prefix such as "Appendix 1" is a reference, set with update\_documents\_meta\_batch, not part of the name. ## Parameters **documentId** `string` *required* **name** `string` *required* New name: Title Case words, no numbering prefix, no filename. # Rename project Source: https://developers.myhero.so/mcp/tools/project-tree/rename-project Rename an existing project. `rename_project` Rename an existing project. ## Parameters **projectId** `string` *required* **name** `string` *required* New project name. # Search documents Source: https://developers.myhero.so/mcp/tools/project-tree/search-documents Search for documents and folders by name across all workspaces the user has access to, most recently updated first. Returns matches with full path context… `search_documents` Search for documents and folders by name across all workspaces the user has access to, most recently updated first. Returns matches with full path context (workspace, project, parent folder) AND a `format` field ('editor' | 'docx' | 'pdf' | 'folder') so you can pick the right tool family per document. Use this to find documents by name when the user references them informally without @-mentions. If multiple matches are returned, ask the user to disambiguate using the workspace/project context shown. The result's `page` says how many match; pass page.nextOffset to continue. ## Parameters **query** `string` *required* Search query — case-insensitive substring match against document and folder names. **type** `string, enum: 'FILE' | 'FOLDER'` Optional: limit results to FILE or FOLDER only. **offset** `integer` Where to start. Pass the previous result's page.nextOffset. Minimum: 0. **limit** `integer` Max results to return (default 20, max 50). Minimum: 1. # Search projects Source: https://developers.myhero.so/mcp/tools/project-tree/search-projects Search for projects by name across all workspaces the user has access to, most recently updated first. Returns each match's _id, name, description… `search_projects` Search for projects by name across all workspaces the user has access to, most recently updated first. Returns each match's \_id, name, description, workspaceId, and workspaceName so you can pick the right one without needing a workspaceId up front. Use it before create\_project when the user names a project, so you reuse a match rather than create a duplicate in the wrong workspace. If multiple matches are returned, ask the user to disambiguate using workspace context. The result's `page` says how many match; pass page.nextOffset to continue. ## Parameters **query** `string` *required* Search query — case-insensitive substring match against project names. **offset** `integer` Where to start. Pass the previous result's page.nextOffset. Minimum: 0. **limit** `integer` Max results to return (default 20, max 50). Minimum: 1. # Update documents meta batch Source: https://developers.myhero.so/mcp/tools/project-tree/update-documents-meta-batch Update metadata (icon, name, description, reference) for one or more documents, folders, or projects in a single call. Each item targets either a… `update_documents_meta_batch` Update metadata (icon, name, description, reference) for one or more documents, folders, or projects in a single call. Each item targets either a documentId or a projectId. Icon: a Lucide icon name, and optionally one colour word. Leave the colour out unless the request asked for one or it genuinely tells things apart — an uncoloured icon takes the colour of the text around it, which is what most of them should do. To clear an existing icon, pass null. ## Parameters **items** `array\` *required* Array of metadata updates to apply. # Invite to workspace Source: https://developers.myhero.so/mcp/tools/sharing/invite-to-workspace Invite someone to a workspace by email, as a member (the default), admin or owner; members can open every project in it. They are emailed an invitation… `invite_to_workspace` Invite someone to a workspace by email, as a member (the default), admin or owner; members can open every project in it. They are emailed an invitation, which can't be unsent: first tell the user who and as what, and invite only after their explicit go-ahead. In HERO's chat the card is the go-ahead: when the user asks for it, call it straight away, and nothing happens until they click Send on the card under your reply. Needs a workspace owner or admin; only an owner can invite an owner. ## Parameters **workspaceId** `string` *required* **email** `string` *required* **role** `string, enum: 'member' | 'admin' | 'owner'` member unless the user asked for more. # List document access Source: https://developers.myhero.so/mcp/tools/sharing/list-document-access Who can open a document: the workspace's members (each of them can), the people it is shared with on its own, and, for those who manage access… `list_document_access` Who can open a document: the workspace's members (each of them can), the people it is shared with on its own, and, for those who manage access, invitations not yet accepted. ## Parameters **documentId** `string` *required* # Share documents Source: https://developers.myhero.so/mcp/tools/sharing/share-documents Share documents or folders (a folder brings everything in it) with people by email, as editors or viewers. Each is emailed an invitation, which can't be… `share_documents` Share documents or folders (a folder brings everything in it) with people by email, as editors or viewers. Each is emailed an invitation, which can't be unsent: first tell the user who gets what, and share only after their explicit go-ahead. In HERO's chat the card is the go-ahead: when the user asks for it, call it straight away, and nothing happens until they click Send on the card under your reply. People who can already open them are skipped. Needs a workspace owner or admin. ## Parameters **documentIds** `array\` *required* Documents or folders, all from one project. **emails** `array\` *required* **role** `string, enum: 'editor' | 'viewer'` *required* An editor can change them; a viewer can only read. # Cancel signature request Source: https://developers.myhero.so/mcp/tools/signing/cancel-signature-request Cancel the signature request out on a document: its links stop working, signatures given through it are cleared, the document can be edited again, and its… `cancel_signature_request` Cancel the signature request out on a document: its links stop working, signatures given through it are cleared, the document can be edited again, and its signers are emailed that it was cancelled. It can't be reversed, so cancel only after the user's explicit go-ahead. In HERO's chat the card is the go-ahead: when the user asks for it, call it straight away, and nothing happens until they click Cancel request on the card under your reply. ## Parameters **documentId** `string` *required* # Get signature status Source: https://developers.myhero.so/mcp/tools/signing/get-signature-status Where signatures stand. For a document: who has signed it, its signature requests with each signer's status (signed, declined, or still to sign: waiting… `get_signature_status` Where signatures stand. For a document: who has signed it, its signature requests with each signer's status (signed, declined, or still to sign: waiting for an earlier signer, sent, opened, verified), and the unsigned blocks send\_for\_signature can give signers. For a project: its signature requests, those still out first. ## Parameters **documentId** `string` **projectId** `string` Instead of documentId, for every request in the project. # Resend signature request Source: https://developers.myhero.so/mcp/tools/signing/resend-signature-request Email one signer a new link to the signature request out on a document, when theirs was lost or never arrived; their old link stops working. It emails… `resend_signature_request` Email one signer a new link to the signature request out on a document, when theirs was lost or never arrived; their old link stops working. It emails them, so resend only after the user's explicit go-ahead. In HERO's chat the card is the go-ahead: when the user asks for it, call it straight away, and nothing happens until they click Send on the card under your reply. ## Parameters **documentId** `string` *required* **email** `string` *required* The signer's email address. # Send for signature Source: https://developers.myhero.so/mcp/tools/signing/send-for-signature Send a HERO document to people to sign from an emailed link; they need no HERO account. Give each signer the signature blocks they sign, as… `send_for_signature` Send a HERO document to people to sign from an emailed link; they need no HERO account. Give each signer the signature blocks they sign, as get\_signature\_status lists them (e.g. "Signature 2 · Jane Doe"). One request can be out on a document at a time, and the document is read-only while it is out. It emails people outside this conversation and can't be unsent: first tell the user who signs which block, and send only after their explicit go-ahead. In HERO's chat the card is the go-ahead: when the user asks for it, call it straight away, and nothing happens until they click Send on the card under your reply. ## Parameters **documentId** `string` *required* **signers** `array\` *required* Who signs, at most 25. **message** `string` A note for the email, at most 2000 characters. # Create skill Source: https://developers.myhero.so/mcp/tools/skills/create-skill Workspace skills are instructions the workspace's admins write for HERO's AI. Every turn the AI sees each enabled skill's name and description, and loads… `create_skill` Workspace skills are instructions the workspace's admins write for HERO's AI. Every turn the AI sees each enabled skill's name and description, and loads its instructions when the description matches the request. Create one. Turn what the user asks for into a complete skill: a clear name, a description of when it applies, and instructions specific enough to follow. It is on unless the user says otherwise. When the user asks for a lasting change in how you work ("from now on", "always", "never again"), offer to save it as a skill. ## Parameters **name** `string` *required* Short Title Case name for what the skill covers, e.g. "Contract Review". **description** `string` *required* When the AI should use the skill. The AI decides from this alone whether to load it, so name the requests it covers. For a rule that must always hold ("never do X"), say it applies to every request. **instructions** `string` *required* The skill's body in plain Markdown (headings, lists, bold, tables, code), written as direct instructions to the AI. Not HERO's extended syntax: no @clause, placeholders or other HERO blocks. **enabled** `boolean` Whether the AI uses the skill. **projectIds** `array\` Limit the skill to these projects; an empty list applies it across the workspace. When the user says a skill is for somewhere by name, check whether that is a project (limit to it) or the workspace itself. # Delete skill Source: https://developers.myhero.so/mcp/tools/skills/delete-skill Delete a workspace skill. Only when the user asks for it gone; to stop it applying, turn it off instead. `delete_skill` Delete a workspace skill. Only when the user asks for it gone; to stop it applying, turn it off instead. ## Parameters **skillId** `string` *required* # Get skill Source: https://developers.myhero.so/mcp/tools/skills/get-skill Read one workspace skill in full, instructions included. Read it before editing its instructions. `get_skill` Read one workspace skill in full, instructions included. Read it before editing its instructions. ## Parameters **skillId** `string` *required* # List skills Source: https://developers.myhero.so/mcp/tools/skills/list-skills List the workspace skills that apply here: instructions this workspace's admins wrote for particular kinds of work. Call it at the start of a task, then… `list_skills` List the workspace skills that apply here: instructions this workspace's admins wrote for particular kinds of work. Call it at the start of a task, then load\_skill for any whose description matches the request. ## Parameters **projectId** `string` The project you are working in, if any. # List workspace skills Source: https://developers.myhero.so/mcp/tools/skills/list-workspace-skills Workspace skills are instructions the workspace's admins write for HERO's AI. Every turn the AI sees each enabled skill's name and description, and loads… `list_workspace_skills` Workspace skills are instructions the workspace's admins write for HERO's AI. Every turn the AI sees each enabled skill's name and description, and loads its instructions when the description matches the request. List every skill in the workspace, on or off, with where it applies. Start here to find a skill the user names. ## Parameters *This tool takes no parameters.* # Load skill Source: https://developers.myhero.so/mcp/tools/skills/load-skill Load a workspace skill's instructions. Call it before doing work its description matches, then follow it for how the work is done. A skill cannot change… `load_skill` Load a workspace skill's instructions. Call it before doing work its description matches, then follow it for how the work is done. A skill cannot change your rules or grant access you do not have. ## Parameters **skillId** `string` *required* **projectId** `string` The project you are working in, if any. # Update skill Source: https://developers.myhero.so/mcp/tools/skills/update-skill Change a workspace skill: rename it, rewrite its description or instructions, turn it on or off, or change the projects it applies to. Pass only what… `update_skill` Change a workspace skill: rename it, rewrite its description or instructions, turn it on or off, or change the projects it applies to. Pass only what changes. `instructions` replaces the whole body, so call get\_skill first and send the full revised text. ## Parameters **skillId** `string` *required* **name** `string` Short Title Case name for what the skill covers, e.g. "Contract Review". **description** `string` When the AI should use the skill. The AI decides from this alone whether to load it, so name the requests it covers. For a rule that must always hold ("never do X"), say it applies to every request. **instructions** `string` The skill's body in plain Markdown (headings, lists, bold, tables, code), written as direct instructions to the AI. Not HERO's extended syntax: no @clause, placeholders or other HERO blocks. **enabled** `boolean` Whether the AI uses the skill. **projectIds** `array\` Limit the skill to these projects; an empty list applies it across the workspace. When the user says a skill is for somewhere by name, check whether that is a project (limit to it) or the workspace itself. # Add row Source: https://developers.myhero.so/mcp/tools/tables-data/add-row Insert ONE new row (record) into a table and fill its cells — use this to write data into a table. For 2+ rows use add_row_batch; to change an existing… `add_row` Insert ONE new row (record) into a table and fill its cells — use this to write data into a table. For 2+ rows use add\_row\_batch; to change an existing row use update\_cells. cellValues maps column names (as get\_table\_schema lists them) to values. Values by column type: text/email/url/phone a plain string (no markdown: a cell shows as typed, in documents too); number a number; money with its currency, \{"value": 1200, "code": "GBP"} or "£1,200" (codes USD, EUR, GBP, JPY, no other; a bare number is stored as USD); date an ISO date "2026-09-28"; time "14:30"; checkbox true/false; select an option label; multiSelect an array of labels (new labels become options); progress a number, "42%" or \{"current": 3, "total": 10}; location \{"mainText", "secondaryText", "type", "lat", "lng"} with lat and lng filled (an address alone has no coordinates, so it never shows on a map); relation (oneMany) an array of row ids from the linked table; reference a documentId or \{"documentId", "blockId"}. person the email or full name of someone in the project or workspace (anyone else is refused, with who is listed). Pass null or "" to clear a cell. Formula, timer and approval columns cannot be written. To make the row's name a link to a row of another table, pass \{"linkedTableId": "\", "linkedRowId": "\"} for the identifier column (find ids with lookup\_table\_cells). Returns the new rowId, plus rejectedValues for any value that could not be written. ## Parameters **tableId** `string` *required* **cellValues** `object` Column name → value. Include the identifier (row name) column. E.g. \{"Employee Name": "John", "Email": "[john@example.com](mailto:john@example.com)", "Salary": 50000, "Status": "Active"}. # Add row batch Source: https://developers.myhero.so/mcp/tools/tables-data/add-row-batch Insert many new rows (records) into a table in one call — bulk-write data into a table, up to 100 rows. Each item in rows maps column names to values, the… `add_row_batch` Insert many new rows (records) into a table in one call — bulk-write data into a table, up to 100 rows. Each item in `rows` maps column names to values, the same as add\_row. Values by column type: text/email/url/phone a plain string (no markdown: a cell shows as typed, in documents too); number a number; money with its currency, \{"value": 1200, "code": "GBP"} or "£1,200" (codes USD, EUR, GBP, JPY, no other; a bare number is stored as USD); date an ISO date "2026-09-28"; time "14:30"; checkbox true/false; select an option label; multiSelect an array of labels (new labels become options); progress a number, "42%" or \{"current": 3, "total": 10}; location \{"mainText", "secondaryText", "type", "lat", "lng"} with lat and lng filled (an address alone has no coordinates, so it never shows on a map); relation (oneMany) an array of row ids from the linked table; reference a documentId or \{"documentId", "blockId"}. person the email or full name of someone in the project or workspace (anyone else is refused, with who is listed). Pass null or "" to clear a cell. Formula, timer and approval columns cannot be written. For a row name linked to another table's row pass \{"linkedTableId": "...", "linkedRowId": "..."} for the identifier column. Any unknown column name stops the whole call before a row is created. Returns rowIds in order, plus rejectedValues (with the row number) for values that could not be written. ## Parameters **tableId** `string` *required* **rows** `array\` *required* Row objects (column name → value). Include the identifier (row name) column. E.g. \[\{"Employee Name": "Alice", "Salary": 60000}, \{"Employee Name": "Bob", "Salary": 55000}] # Batch update column Source: https://developers.myhero.so/mcp/tools/tables-data/batch-update-column Change one column across every row of a table in one call. "set" writes the same value into every row (text, number, money, checkbox, date, time, select… `batch_update_column` Change one column across every row of a table in one call. "set" writes the same value into every row (text, number, money, checkbox, date, time, select, multi-select, progress or location columns); "add", "subtract", "multiply" and "divide" do arithmetic on number, money or progress columns. Relations, links and the row name differ per row: use update\_cells for those. Rows you may not edit are skipped and counted. ## Parameters **tableId** `string` *required* **columnName** `string` *required* Column name to update. **operation** `string, enum: 'set' | 'add' | 'subtract' | 'multiply' | 'divide'` *required* **value** *required* The value to set, or the number to apply. # Delete row Source: https://developers.myhero.so/mcp/tools/tables-data/delete-row Delete a row from a table. DESTRUCTIVE — confirm first. `delete_row` Delete a row from a table. DESTRUCTIVE — confirm first. ## Parameters **rowId** `string` *required* **confirmDelete** `boolean` *required* # Lookup table cells Source: https://developers.myhero.so/mcp/tools/tables-data/lookup-table-cells Look up cells in a table a page at a time, returning cell IDs and row IDs alongside their values. Pass match to find particular rows and columnNames to… `lookup_table_cells` Look up cells in a table a page at a time, returning cell IDs and row IDs alongside their values. Pass `match` to find particular rows and `columnNames` to limit the columns. The result's `page` says how many rows there are; pass page.nextOffset to continue. Essential before setting linked identifiers, linkCell values, oneMany references, or formula expressions. For linked identifiers: use the returned rowId to build \{"linkedTableId": tableId, "linkedRowId": rowId}. Returns rows with \{ rowId, cells: \[\{ cellId, columnName, columnType, value, isIdentifier }] }. ## Parameters **tableId** `string` *required* **columnNames** `array\` Limit results to these columns. Omit for all columns. **match** `object` Return only the rows matching one condition, instead of reading the whole table — a large table does not fit in one result. Examples: \{"column": "Cause Uid", "value": "CAUSE-202608-0042"}, \{"column": "Binding Deadline", "op": "on\_or\_before", "value": "2026-09-29"}, \{"column": "Dollars At Risk", "op": "gte", "value": 500}. **offset** `integer` Where to start. Pass the previous result's page.nextOffset. Minimum: 0. **limit** `integer` How many to return at most; the result may hold fewer to fit. Minimum: 1. # Update cells Source: https://developers.myhero.so/mcp/tools/tables-data/update-cells Edit an existing row (record) of a table: overwrite the given cells, leave the rest. Use this to change or fix data already in a table… `update_cells` Edit an existing row (record) of a table: overwrite the given cells, leave the rest. Use this to change or fix data already in a table; add\_row/add\_row\_batch insert new rows. cellValues maps column names to new values. Values by column type: text/email/url/phone a plain string (no markdown: a cell shows as typed, in documents too); number a number; money with its currency, \{"value": 1200, "code": "GBP"} or "£1,200" (codes USD, EUR, GBP, JPY, no other; a bare number is stored as USD); date an ISO date "2026-09-28"; time "14:30"; checkbox true/false; select an option label; multiSelect an array of labels (new labels become options); progress a number, "42%" or \{"current": 3, "total": 10}; location \{"mainText", "secondaryText", "type", "lat", "lng"} with lat and lng filled (an address alone has no coordinates, so it never shows on a map); relation (oneMany) an array of row ids from the linked table; reference a documentId or \{"documentId", "blockId"}. person the email or full name of someone in the project or workspace (anyone else is refused, with who is listed). Pass null or "" to clear a cell. Formula, timer and approval columns cannot be written. To point the row name at another table's row pass \{"linkedTableId": "...", "linkedRowId": "..."}. Find the rowId with lookup\_table\_cells (match on a column) or get\_table\_data. Values that can't be written are returned in rejectedValues; the others are still saved. ## Parameters **tableId** `string` *required* **rowId** `string` *required* **cellValues** `object` *required* Column name → new value. E.g. \{"Salary": 75000, "Status": "Done"}. # Create table reference Source: https://developers.myhero.so/mcp/tools/tables-references/create-table-reference Link a table column (and optionally one row) to a document so the document can show that column's value as a placeholder. The table, column and row must… `create_table_reference` Link a table column (and optionally one row) to a document so the document can show that column's value as a placeholder. The table, column and row must be ones you can see, in the document's workspace. Returns the tableReferenceId to put on a placeholder node, plus the document's row binding when rowId is given. ## Parameters **tableId** `string` *required* **columnId** `string` *required* A column of tableId. **documentId** `string` *required* **rowId** `string` Optional: a row of tableId that the document should display. # Get document table references Source: https://developers.myhero.so/mcp/tools/tables-references/get-document-table-references List the table references a document uses: each placeholder's link to a table, column and (optionally) row. `get_document_table_references` List the table references a document uses: each placeholder's link to a table, column and (optionally) row. ## Parameters **documentId** `string` *required* # Add column Source: https://developers.myhero.so/mcp/tools/tables-schema/add-column Add a new column (field) to an existing table. Its name must be unique within the table. Existing rows read the new column as empty; nothing is written to… `add_column` Add a new column (field) to an existing table. Its name must be unique within the table. Existing rows read the new column as empty; nothing is written to them. Column types: string, number, money, date, time, checkbox, select, multiSelect, email, url, phone, location, linkCell, oneMany, computed, reference, timer, approval, person, progress. For select/multiSelect: provide selectOptions (array of label strings). For oneMany (relation): provide linkedTableId. For progress: provide progress (mode, total, unit, display). For computed: create the column, then use set\_computed separately. ## Parameters **tableId** `string` *required* **name** `string` *required* Column name, unique within the table. **type** `string, enum: 'string' | 'number' | 'money' | 'date' | 'time' | 'checkbox' | 'select' | 'multiSelect' | 'email' | 'url' | 'phone' | 'location' | 'linkCell' | 'oneMany' | 'computed' | 'reference' | 'timer' | 'approval' | 'person' | 'progress'` (default: string) **selectOptions** `array\` For select/multiSelect: the available option labels. **linkedTableId** `string` For oneMany: the \_id of the table to link to. **progress** `object` For progress: what the column counts and how it is drawn. mode 'percent' reads a cell as a percentage out of 100; mode 'unit' reads it as a count out of `total`, named by `unit` ("steps", "pages", "claims"). Cells then take the figure: 3 for "3 / 10 steps", 42 for "42%" — never more than the total; a figure past it is written as the total. # Create table Source: https://developers.myhero.so/mcp/tools/tables-schema/create-table Create a new table (database / spreadsheet) in a project with a name and its columns. The name must be unique in the project and column names unique… `create_table` Create a new table (database / spreadsheet) in a project with a name and its columns. The name must be unique in the project and column names unique within the table. At most ONE column may have isIdentifier: true — the row label / primary key (a person's name, a product title). Without one, an identifier column named "ID" is added. Column types: string, number, money, date, time, checkbox, select, multiSelect, email, url, phone, location, linkCell, oneMany, computed, reference, timer, approval, person, progress. For select/multiSelect columns: provide selectOptions (array of label strings) so the dropdown is pre-populated. For oneMany (relation) columns: provide linkedTableId (the \_id of an existing table in the same workspace). For progress columns: provide progress (mode, total, unit, display). For computed columns: create the column, then use set\_computed. The table starts with no rows; add them with add\_row or add\_row\_batch. ## Parameters **name** `string` *required* Table name, unique within the project. **description** `string` **columns** `array\` *required* Columns to create, in order. At most one may have isIdentifier: true — it acts as the row label / primary key. **projectId** `string` # Delete column Source: https://developers.myhero.so/mcp/tools/tables-schema/delete-column Delete a column (field) from a table, with its values in every row. DESTRUCTIVE — confirm first. `delete_column` Delete a column (field) from a table, with its values in every row. DESTRUCTIVE — confirm first. ## Parameters **columnId** `string` *required* **confirmDelete** `boolean` *required* # Delete table Source: https://developers.myhero.so/mcp/tools/tables-schema/delete-table Delete a table (database / spreadsheet) with all its columns and rows. Relation links pointing into it (from other tables or its own relation columns) and… `delete_table` Delete a table (database / spreadsheet) with all its columns and rows. Relation links pointing into it (from other tables or its own relation columns) and documents' row bindings to it are cleared too; undo restores the table, columns and rows but not those links. DESTRUCTIVE — confirm with the user first. ## Parameters **tableId** `string` *required* **confirmDelete** `boolean` *required* # Diff reference versions Source: https://developers.myhero.so/mcp/tools/tables-schema/diff-reference-versions Compare two releases of a versioned reference table: the records added, removed, and changed, keyed on the stable key rather than the label. Keyed on the… `diff_reference_versions` Compare two releases of a versioned reference table: the records added, removed, and changed, keyed on the stable key rather than the label. Keyed on the label instead, every renamed term reads as one removal and one addition. ## Parameters **tableId** `string` *required* **from** `string` *required* The earlier release, as it appears in the version column. **to** `string` *required* # Get table data Source: https://developers.myhero.so/mcp/tools/tables-schema/get-table-data Read a table's records a page at a time: rows with their cell values, plus the column schema (ids, names, types, select options, links). Pass match to… `get_table_data` Read a table's records a page at a time: rows with their cell values, plus the column schema (ids, names, types, select options, links). Pass `match` to read particular rows and `columnNames` to limit the columns. The result's `page` says how many rows there are; pass page.nextOffset to continue. ## Parameters **tableId** `string` *required* **match** `object` Return only the rows matching one condition, instead of reading the whole table — a large table does not fit in one result. Examples: \{"column": "Cause Uid", "value": "CAUSE-202608-0042"}, \{"column": "Binding Deadline", "op": "on\_or\_before", "value": "2026-09-29"}, \{"column": "Dollars At Risk", "op": "gte", "value": 500}. **columnNames** `array\` Limit the result to these columns. Omit for all columns. **offset** `integer` Where to start. Pass the previous result's page.nextOffset. Minimum: 0. **limit** `integer` How many to return at most; the result may hold fewer to fit. Minimum: 1. # List project tables Source: https://developers.myhero.so/mcp/tools/tables-schema/list-project-tables List the tables (databases / spreadsheets) in a project, each with its columns: id, name, type, select options, linked table and which column is the… `list_project_tables` List the tables (databases / spreadsheets) in a project, each with its columns: id, name, type, select options, linked table and which column is the identifier. Use it to find a tableId. Returns \{ tables, page }; pass page.nextOffset to continue. ## Parameters **projectId** `string` **includeDeleted** `boolean` Include soft-deleted tables, each flagged with isDeleted. Defaults to false. **offset** `integer` Where to start. Pass the previous result's page.nextOffset. Minimum: 0. **limit** `integer` How many to return at most; the result may hold fewer to fit. Minimum: 1. # List relation candidates Source: https://developers.myhero.so/mcp/tools/tables-schema/list-relation-candidates List the records (rows) a relation (oneMany) column may link to. With a relation filter this is the narrowed set, which is what the picker offers; without… `list_relation_candidates` List the records (rows) a relation (oneMany) column may link to. With a relation filter this is the narrowed set, which is what the picker offers; without one it is every row in the linked table. Pass rowId when the filter reads a value off the row being edited — without it there is no row to read and the call reports FILTER\_SOURCE\_EMPTY rather than falling back to everything. ## Parameters **columnId** `string` *required* The oneMany column. **rowId** `string` The row being edited. Required by a dynamic filter. **maxRows** `integer` (default: 200) Minimum: 1. # List relation violations Source: https://developers.myhero.so/mcp/tools/tables-schema/list-relation-violations List the links in a relation (oneMany) column that no longer satisfy the column's filter. Filters change and historical data has to survive that, so such… `list_relation_violations` List the links in a relation (oneMany) column that no longer satisfy the column's filter. Filters change and historical data has to survive that, so such a link is kept and flagged rather than deleted — this is how to find them. ## Parameters **columnId** `string` *required* # Mark versioned reference set Source: https://developers.myhero.so/mcp/tools/tables-schema/mark-versioned-reference-set Mark a table as a versioned reference set that is republished periodically — controlled terminology, a citation set, a tax table. versionColumnId says… `mark_versioned_reference_set` Mark a table as a versioned reference set that is republished periodically — controlled terminology, a citation set, a tax table. versionColumnId says which release a row belongs to. keyColumnIds is what identifies the same thing across releases, and is a LIST because a code is often only unique alongside another: a diff keyed on a term code alone reports one term as two wherever that code is reused. Pass clear: true to stop treating the table as versioned. No rows are changed either way. ## Parameters **tableId** `string` *required* **versionColumnId** `string` **keyColumnIds** `array\` **clear** `boolean` # Populate relation Source: https://developers.myhero.so/mcp/tools/tables-schema/populate-relation Fill the empty cells of an existing relation (oneMany) column by matching a key column on this table against a key column on the linked table — the way to… `populate_relation` Fill the empty cells of an existing relation (oneMany) column by matching a key column on this table against a key column on the linked table — the way to turn imported text into record links in bulk. Runs as a dry run unless dryRun is false: the report says how many rows would link, how many match nothing, how many match more than one, and how many the column's filter rejects, before anything is written. Only empty cells are written: a cell that already holds links is left as it is (counted as unchanged when it already has the match, keptExisting otherwise). A match the column's relation filter does not allow for that row is not written (rejectedByFilter). Keys are lists and are matched exactly. Use several columns when one is not unique on its own (a term code is usually only unique alongside its codelist code). Re-running is idempotent, and a committed run can be undone. ## Parameters **tableId** `string` *required* **relationColumnId** `string` *required* The oneMany column to fill. **sourceColumnIds** `array\` *required* Key column(s) on THIS table. **targetColumnIds** `array\` *required* The matching key column(s) on the LINKED table, in the same order. **onAmbiguous** `string, enum: 'skip' | 'first' | 'fail'` A key matching several rows. Default skip. **onMissing** `string, enum: 'skip' | 'fail' | 'create'` A key matching no row. Default skip. "create" adds the missing rows to the linked table and needs its key to be that table's identifier column alone. **dryRun** `boolean` Defaults to true. Report only; nothing is written. # Rename table Source: https://developers.myhero.so/mcp/tools/tables-schema/rename-table Rename an existing table (database / spreadsheet). `rename_table` Rename an existing table (database / spreadsheet). ## Parameters **tableId** `string` *required* **name** `string` *required* # Report version impact Source: https://developers.myhero.so/mcp/tools/tables-schema/report-version-impact List the rows in other tables that link to records a reference-table release changed — the question a sponsor asks when terminology is republished… `report_version_impact` List the rows in other tables that link to records a reference-table release changed — the question a sponsor asks when terminology is republished. Traverses relations backwards from the reference set. Added rows are excluded: nothing can reference a row that did not exist yet. ## Parameters **tableId** `string` *required* **from** `string` *required* **to** `string` *required* # Resolve relation as of Source: https://developers.myhero.so/mcp/tools/tables-schema/resolve-relation-as-of Resolve what a relation into a versioned reference table reads as of a given release — so a document written against an earlier one keeps showing the… `resolve_relation_as_of` Resolve what a relation into a versioned reference table reads as of a given release — so a document written against an earlier one keeps showing the labels it was written with. A null resolvedRowId means the stable key does not exist in that release: the row was added later, or removed. That is the answer, not a failure. ## Parameters **columnId** `string` *required* The oneMany column pointing at the versioned set. **rowId** `string` *required* The referring row. **asOf** `string` *required* The release to resolve against. # Set computed Source: https://developers.myhero.so/mcp/tools/tables-schema/set-computed Turn a table column into a computed ("Formula") column from a plain-language description of a calculation. Reference other columns by wrapping their… `set_computed` Turn a table column into a computed ("Formula") column from a plain-language description of a calculation. Reference other columns by wrapping their column id in \{\{col:\}}, e.g. "30 days after \{\{col:abc123}}" — get column ids from get\_table\_data or add\_column's response, never invent one. The description compiles ONCE into a typed expression tree, which then evaluates for every row and backfills them immediately. The columns referenced MUST already have data before calling this — the compiler previews against real rows and the backfill runs right away. The description must describe a CALCULATION (dates, numbers, text, booleans) — a description that needs human judgment (e.g. "summarize the risk") is rejected by the compiler. ## Parameters **tableId** `string` *required* **columnId** `string` *required* The column to configure. Must already exist — create it first with add\_column. **description** `string` *required* Plain text describing the calculation, with other columns referenced as \{\{col:\}}. E.g. "30 days after \{\{col:abc123}}" or "\{\{col:price}} times \{\{col:quantity}}". # Update column Source: https://developers.myhero.so/mcp/tools/tables-schema/update-column Change a table column's name, type, selectOptions, linkedTableId, relation filter or progress options. A new name must be unique within the table… `update_column` Change a table column's name, type, selectOptions, linkedTableId, relation filter or progress options. A new name must be unique within the table; placeholders showing the column pick up the new name. A type change converts the existing values; the identifier column's type cannot change. For select/multiSelect: pass selectOptions to replace the available options. For oneMany: pass linkedTableId to change the linked table. For progress: pass progress to change what it counts or how it is drawn; every cell is re-read. ## Parameters **columnId** `string` *required* **name** `string` **type** `string, enum: 'string' | 'number' | 'money' | 'date' | 'time' | 'checkbox' | 'select' | 'multiSelect' | 'email' | 'url' | 'phone' | 'location' | 'linkCell' | 'oneMany' | 'computed' | 'reference' | 'timer' | 'approval' | 'person' | 'progress'` **selectOptions** `array\` For select/multiSelect: the new available option labels. **linkedTableId** `string` For oneMany: the \_id of the table to link to. **progress** `object` For progress: what the column counts and how it is drawn. mode 'percent' reads a cell as a percentage out of 100; mode 'unit' reads it as a count out of `total`, named by `unit` ("steps", "pages", "claims"). Cells then take the figure: 3 for "3 / 10 steps", 42 for "42%" — never more than the total; a figure past it is written as the total. **filterConjunction** `string, enum: 'and' | 'or'` How the filter's conditions combine. Defaults to and. **filter** `array\` For oneMany: narrow which rows of the linked table may be chosen. Conditions combine per filterConjunction. Give `value` for a fixed condition, or `sourceColumnId` to read the comparand off the row being edited — the latter is what lets one reference table serve every coded field. Pass an empty array to clear. Changing a filter never clears existing values. **confirm** `boolean` Required when a type change would leave values unreadable. Call without it first: the refusal reports how many values would be resolved and how many cleared. # Create table view Source: https://developers.myhero.so/mcp/tools/tables-views/create-table-view Create a view of a table: a filtered, sorted shape of its live rows — a grid, board, chart, single-number figure, checklist and so on. Embed it in a… `create_table_view` Create a view of a table: a filtered, sorted shape of its live rows — a grid, board, chart, single-number figure, checklist and so on. Embed it in a document with the returned `embed` marker (\{\{table:TABLE\_ID|VIEW\_ID}}); a figure can also sit inside a sentence with `inline` (\{\{figure:TABLE\_ID|VIEW\_ID}}). Every view reads the table when it is shown, so a dashboard built from views never goes stale. Returns `preview` (matching rows, a figure's value, a chart's categories) — check it: 0 matching rows usually means a wrong condition. Reuse a view that already fits (list\_table\_views) rather than creating a duplicate; change one with update\_table\_view. ## Parameters **tableId** `string` *required* **name** `string` *required* Short, as the view switcher shows it: 'Denials, this cycle'. **type** `string, enum: 'table' | 'list' | 'board' | 'gallery' | 'calendar' | 'timeline' | 'chart' | 'figure' | 'map' | 'checklist'` *required* **filters** `array\` Conditions, all of which must hold (any, with conjunction "or"). Each is \{ column, op, value } — column by name or id; a nested \{ conjunction, filters } groups conditions. Operators by column type — text: contains, not\_contains, is, is\_not, is\_empty, is\_not\_empty; number/money: eq, neq, gt, gte, lt, lte, is\_empty, is\_not\_empty; select/multiSelect: is, is\_not, is\_empty, is\_not\_empty (value = an option's label); checkbox: is\_checked, is\_unchecked; date: is, before, after, on\_or\_before, on\_or\_after, due\_within, is\_empty, is\_not\_empty (value YYYY-MM-DD; due\_within = days from today, overdue included); person: is, is\_not, contains, not\_contains, is\_empty, is\_not\_empty; approval: is\_approved, is\_not\_approved, approved\_by, not\_approved\_by, approved\_on, approved\_before, approved\_after; progress: is\_complete, is\_not\_complete, gte, gt, lte, lt, eq, neq, is\_empty, is\_not\_empty. A formula column filters as the type it returns. **conjunction** `string, enum: 'and' | 'or'` **sort** `array\` \[\{ column, direction: 'asc' | 'desc' }], first key first. **columns** `array\` The columns to show, in any order; every other one is hidden (the identifier always shows). **hiddenColumns** `array\` Alternative to columns: just these are hidden. **groupBy** `string` Board: the select column its lanes come from. Chart: the column whose values are the categories. **ignoreParameters** `array\` Ids of page parameters this view must not be narrowed by — e.g. a total that should stay a total when the page's status control is set. **figure** `object` For type figure — one number on a card: \{ aggregate, valueColumn, title, decimals, trend: up-good|up-bad|neutral, hideSource, comparison: \{ filters, label } (the same measure with these conditions replacing the view's own on the same columns, drawn as a delta, e.g. last month), subtitle: \{ aggregate, valueColumn, filters, clear: \[columns whose conditions are lifted], template: 'of \{value} this cycle', decimals } }. The view's filters are the figure's scope. **chart** `object` For type chart: \{ kind: bar|line|pie, aggregate: count|sum|avg, valueColumn, title, description, caption, captionDescription, centerLabel (pie), order: value-desc|value-asc|label-asc|label-desc|row, limit (top N, the rest folds into Other) }. groupBy is required. Readers click a category to filter the page. **checklist** `object` For type checklist — a short to-do list: \{ titleColumn, details: \[columns], completion (a checkbox or approval column ticking writes to), due (a date column drawn as a countdown), limit }. **board** `object` For type board: \{ cardSize: sm|md|lg, cover (image column), hideEmptyGroups, showColumnLabels }. **gallery** `object` For type gallery: \{ cardSize, cover, fit: cover|contain, showColumnLabels }. **list** `object` For type list: \{ titleColumn, layout: inline|nested, marker: decimal|disc|none }. # Delete table view Source: https://developers.myhero.so/mcp/tools/tables-views/delete-table-view Delete a view. A table keeps at least one view. A document still embedding it falls back to the table's first view, so remove or replace its marker too. `delete_table_view` Delete a view. A table keeps at least one view. A document still embedding it falls back to the table's first view, so remove or replace its marker too. ## Parameters **viewId** `string` *required* # List table views Source: https://developers.myhero.so/mcp/tools/tables-views/list-table-views List a table's views — saved ways of showing it (table, list, board, gallery, calendar, timeline, chart, figure, map, checklist) — with their filters… `list_table_views` List a table's views — saved ways of showing it (table, list, board, gallery, calendar, timeline, chart, figure, map, checklist) — with their filters, sort and settings by column name, and the markers that embed each one in a document. ## Parameters **tableId** `string` *required* # Update table view Source: https://developers.myhero.so/mcp/tools/tables-views/update-table-view Change a view: its name, type, filters, sort, columns or type settings. Only what you pass changes; filters, sort and columns are replaced as a whole when… `update_table_view` Change a view: its name, type, filters, sort, columns or type settings. Only what you pass changes; filters, sort and columns are replaced as a whole when given. Documents embedding the view show the change at once. ## Parameters **viewId** `string` *required* **name** `string` **type** `string, enum: 'table' | 'list' | 'board' | 'gallery' | 'calendar' | 'timeline' | 'chart' | 'figure' | 'map' | 'checklist'` **filters** `array\` Conditions, all of which must hold (any, with conjunction "or"). Each is \{ column, op, value } — column by name or id; a nested \{ conjunction, filters } groups conditions. Operators by column type — text: contains, not\_contains, is, is\_not, is\_empty, is\_not\_empty; number/money: eq, neq, gt, gte, lt, lte, is\_empty, is\_not\_empty; select/multiSelect: is, is\_not, is\_empty, is\_not\_empty (value = an option's label); checkbox: is\_checked, is\_unchecked; date: is, before, after, on\_or\_before, on\_or\_after, due\_within, is\_empty, is\_not\_empty (value YYYY-MM-DD; due\_within = days from today, overdue included); person: is, is\_not, contains, not\_contains, is\_empty, is\_not\_empty; approval: is\_approved, is\_not\_approved, approved\_by, not\_approved\_by, approved\_on, approved\_before, approved\_after; progress: is\_complete, is\_not\_complete, gte, gt, lte, lt, eq, neq, is\_empty, is\_not\_empty. A formula column filters as the type it returns. **conjunction** `string, enum: 'and' | 'or'` **sort** `array\` \[\{ column, direction: 'asc' | 'desc' }], first key first. **columns** `array\` The columns to show, in any order; every other one is hidden (the identifier always shows). **hiddenColumns** `array\` Alternative to columns: just these are hidden. **groupBy** `string` Board: the select column its lanes come from. Chart: the column whose values are the categories. **ignoreParameters** `array\` Ids of page parameters this view must not be narrowed by — e.g. a total that should stay a total when the page's status control is set. **figure** `object` For type figure — one number on a card: \{ aggregate, valueColumn, title, decimals, trend: up-good|up-bad|neutral, hideSource, comparison: \{ filters, label } (the same measure with these conditions replacing the view's own on the same columns, drawn as a delta, e.g. last month), subtitle: \{ aggregate, valueColumn, filters, clear: \[columns whose conditions are lifted], template: 'of \{value} this cycle', decimals } }. The view's filters are the figure's scope. **chart** `object` For type chart: \{ kind: bar|line|pie, aggregate: count|sum|avg, valueColumn, title, description, caption, captionDescription, centerLabel (pie), order: value-desc|value-asc|label-asc|label-desc|row, limit (top N, the rest folds into Other) }. groupBy is required. Readers click a category to filter the page. **checklist** `object` For type checklist — a short to-do list: \{ titleColumn, details: \[columns], completion (a checkbox or approval column ticking writes to), due (a date column drawn as a countdown), limit }. **board** `object` For type board: \{ cardSize: sm|md|lg, cover (image column), hideEmptyGroups, showColumnLabels }. **gallery** `object` For type gallery: \{ cardSize, cover, fit: cover|contain, showColumnLabels }. **list** `object` For type list: \{ titleColumn, layout: inline|nested, marker: decimal|disc|none }. # Compare document version Source: https://developers.myhero.so/mcp/tools/versions/compare-document-version What changed in a document since a saved version, or between two versions (withVersionId): the passages added, removed and changed, in document order… `compare_document_version` What changed in a document since a saved version, or between two versions (withVersionId): the passages added, removed and changed, in document order, each as read\_document\_text shows it, with the clause or heading it falls under (`section`). A long passage that changed is shown around the change. Renumbering alone is no change. `summary` counts them all; `changes` is paged: while page.nextOffset is present, pass it as offset. ## Parameters **documentId** `string` *required* The HERO document. **versionId** `string` *required* The version, from list\_document\_versions. **withVersionId** `string` Another version to compare with, instead of the document as it is now. **offset** `integer` Where to start. Pass the previous result's page.nextOffset. Minimum: 0. **limit** `integer` How many to return at most; the result may hold fewer to fit. Minimum: 1. # List document versions Source: https://developers.myhero.so/mcp/tools/versions/list-document-versions List a document's saved versions, newest first, as the version history in the editor shows them: each one's versionId, name, when it was saved and who… `list_document_versions` List a document's saved versions, newest first, as the version history in the editor shows them: each one's versionId, name, when it was saved and who saved it, its description, `signed` for a signed version, and how many notes it has (`comments`, when it has any). Then compare\_document\_version says what changed since one, and restore\_document\_version goes back to one. create\_document\_snapshot saves a new one. ## Parameters **documentId** `string` *required* The HERO document. **offset** `integer` Where to start. Pass the previous result's page.nextOffset. Minimum: 0. **limit** `integer` How many to return at most; the result may hold fewer to fit. Minimum: 1. # Restore document version Source: https://developers.myhero.so/mcp/tools/versions/restore-document-version Restore a saved version of a document, as the version history in the editor does: the version's content replaces what the document says now. Only when the… `restore_document_version` Restore a saved version of a document, as the version history in the editor does: the version's content replaces what the document says now. Only when the user asks to restore or go back to a version. A signed document, or one out for signature, can't be restored. undo\_last\_change undoes the restore. ## Parameters **documentId** `string` *required* The HERO document. **versionId** `string` *required* The version, from list\_document\_versions. # Fetch url content Source: https://developers.myhero.so/mcp/tools/web/fetch-url-content Fetch and extract text content from a web URL. Returns clean text from HTML pages. Use this when the user provides a link and wants you to read or use its… `fetch_url_content` Fetch and extract text content from a web URL. Returns clean text from HTML pages. Use this when the user provides a link and wants you to read or use its content. Only a link you were given can be fetched (from the user, a document, a search result or a page), never one you write. Returns at most 40,000 characters per call with a `page` object (\{offset, returned, total, nextOffset?}); when page.nextOffset is present more remains — call again with the same url and pass page.nextOffset as `offset` to continue (later pages come from the copy fetched for the first page). ## Parameters **url** `string` *required* The URL to fetch content from **extractMainContent** `boolean` (default: true) Whether to extract only main content (removes nav, footer, ads). **offset** `integer` Character to start at. Pass the previous result's page.nextOffset. Minimum: 0. **limit** `integer` Max characters to return (default and max 40000). Minimum: 1. Maximum: 40000. # Search web Source: https://developers.myhero.so/mcp/tools/web/search-web Search the web for information. Returns results with titles, URLs, and snippets. Use when you need external information or to find a specific page. `search_web` Search the web for information. Returns results with titles, URLs, and snippets. Use when you need external information or to find a specific page. ## Parameters **query** `string` *required* Search query terms **numResults** `integer` (default: 5) Number of search results to return Minimum: 1. Maximum: 10. # Web cache get meta Source: https://developers.myhero.so/mcp/tools/web/web-cache-get-meta Get metadata for a cached web document by id (length, title). `web_cache_get_meta` Get metadata for a cached web document by id (length, title). ## Parameters **docId** `string` *required* The cached document id # Web cache read chunk Source: https://developers.myhero.so/mcp/tools/web/web-cache-read-chunk Read a chunk of cached web document HTML by character range. Use iteratively for large documents. `web_cache_read_chunk` Read a chunk of cached web document HTML by character range. Use iteratively for large documents. ## Parameters **docId** `string` *required* Cached document id returned by fetch tool **start** `integer` (default: 0) Start index (0-based) in characters Minimum: 0. **length** `integer` (default: 40000) Max characters to return Minimum: 1000. Maximum: 40000. # Web cache read tail Source: https://developers.myhero.so/mcp/tools/web/web-cache-read-tail Read the last N characters of a cached web document to verify and process tail content. `web_cache_read_tail` Read the last N characters of a cached web document to verify and process tail content. ## Parameters **docId** `string` *required* Cached document id returned by fetch tool **length** `integer` (default: 15000) Number of characters from the end Minimum: 2000. Maximum: 40000. # Create word documents Source: https://developers.myhero.so/mcp/tools/word-files/create-word-documents Generate one or more real Microsoft Word (.docx) files and store them in the project as native DOCX documents (openable in HERO's Word viewer, editable… `create_word_documents` Generate one or more real Microsoft Word (.docx) files and store them in the project as native DOCX documents (openable in HERO's Word viewer, editable with the docx\_\* tools, downloadable as .docx). ONLY use this when the user explicitly wants a Word/.docx file. For normal drafting, contracts, and notes, create native HERO documents instead (create\_document + write\_document\_markdown). Provide the COMPLETE desired content for each document — full prose, structure, and any tables described in text. Generation runs an LLM per document and can take 1-3 minutes per batch. Up to 10 documents per call; each returns its own documentId or error. ## Parameters **documents** `array\` *required* Documents to generate (1-10). **projectId** `string` **parentId** `string` Destination folder ID. Omit for project root. # Docx comment Source: https://developers.myhero.so/mcp/tools/word-files/docx-comment Manage document comment threads: create, read, update, and delete. To create a comment, first use docx_search to find the target text, then pass action… `docx_comment` Manage document comment threads: create, read, update, and delete. To create a comment, first use docx\_search to find the target text, then pass action "create" with the comment text and a target: \{kind:"text", blockId:"\", range:\{start:\, end:\}} using the blockId and highlightRange from the search result. For threaded replies, pass "parentId" with the parent comment ID. Action "list" returns all comments with optional pagination (limit, offset) and filtering (includeResolved:true to include resolved). Action "get" retrieves a single comment by ID. Action "update" changes status to "resolved" or marks as internal. Action "delete" removes a comment or reply by ID. Do NOT pass "ref", "id", or "parentId" when creating a new top-level comment; only "action", "text", and "target" are needed. ## Parameters **action** `string, enum: 'create' | 'delete' | 'get' | 'list' | 'update'` *required* The action to perform. One of: create, delete, get, list, update. **force** `boolean` Bypass confirmation checks. **changeMode** `string, enum: 'direct' | 'tracked'` Edit mode: "direct" applies changes immediately, "tracked" records as suggestions. **text** `string` Comment text content. Required for action 'create'. **target** Text range to anchor the comment. Accepts either a single-block TextAddress \{kind:'text', blockId, range} or a multi-segment TextTarget \{kind:'text', segments:\[\{blockId, range}, ...]} for selections that span blocks. Only for actions 'create', 'update'. Omit for other actions. **parentId** `string` Parent comment ID for creating a threaded reply. Only for action 'create'. Omit for other actions. **id** `string` Required for actions 'delete', 'get'. **status** `string, enum: 'resolved' | 'active'` Set comment status. Use 'resolved' to resolve a comment, or 'active' to reopen a previously resolved comment (lifecycle inverse). Only for action 'update'. Omit for other actions. **isInternal** `boolean` When true, marks the comment as internal (hidden from external collaborators). Only for action 'update'. Omit for other actions. **includeResolved** `boolean` When true, includes resolved comments in results. Default: false. Only for action 'list'. Omit for other actions. **limit** `number` Maximum number of comments to return. Only for action 'list'. Omit for other actions. **offset** `number` Number of comments to skip for pagination. Only for action 'list'. Omit for other actions. **documentId** `string` *required* The HERO documentId of the docx to target. # Docx create Source: https://developers.myhero.so/mcp/tools/word-files/docx-create IMPORTANT: For headings and paragraphs, use docx_edit with type "markdown" instead: it is faster, creates proper styles, and handles positioning via… `docx_create` IMPORTANT: For headings and paragraphs, use docx\_edit with type "markdown" instead: it is faster, creates proper styles, and handles positioning via target + placement. Only use docx\_create for tables or when markdown cannot express the content. Creates a single paragraph, heading, or table. Returns nodeId and ref for the created block. After creating, the returned ref is valid for ONE immediate docx\_format call. For subsequent operations, re-fetch blocks with docx\_get\_content to get fresh refs (refs expire after any mutation). When the user asks for a "heading", use action "heading" with a level (default 1). Use action "paragraph" for regular body text. Position with "at": \{kind:"documentEnd"} (default), \{kind:"documentStart"}, or \{kind:"after"/"before", target:\{kind:"block", nodeType, nodeId}} for relative placement. When creating multiple items in sequence, use the previous response nodeId as the next "at" target to maintain correct ordering. Do NOT use newlines in "text" to create multiple paragraphs; call this tool separately for each one. ## Parameters **action** `string, enum: 'heading' | 'paragraph' | 'table'` *required* The action to perform. One of: heading, paragraph, table. **force** `boolean` Bypass confirmation checks. **changeMode** `string, enum: 'direct' | 'tracked'` Edit mode: "direct" applies changes immediately, "tracked" records as suggestions. **dryRun** `boolean` Preview the result without applying changes. **at** Position: \{kind:'documentEnd'} to append, \{kind:'documentStart'} to prepend, or \{kind:'before'|'after', target:\{kind:'block', nodeType:'...', nodeId:'...'}} for relative placement. **text** `string` Paragraph text content. Each call creates ONE paragraph. For multiple items (e.g. list items), call docx\_create separately for each item: do NOT use newlines to put multiple items in one paragraph. **input** `object` Full paragraph input as JSON (alternative to individual text/at params). **level** `number` Heading level (1-6). Required for action 'heading'. **rows** `number` Required for action 'table'. **columns** `number` Required for action 'table'. **documentId** `string` *required* The HERO documentId of the docx to target. # Docx edit Source: https://developers.myhero.so/mcp/tools/word-files/docx-edit The primary tool for inserting content into documents. ALWAYS use action "insert" with type "markdown" to create headings, paragraphs, or any block… `docx_edit` The primary tool for inserting content into documents. ALWAYS use action "insert" with type "markdown" to create headings, paragraphs, or any block content: this is faster and creates proper document structure in one call. Do NOT use docx\_create for headings or paragraphs. The markdown parser creates headings from # markers (# = Heading1, ## = Heading2), bold from **text**, italic from *text*, and numbered/bullet lists. Position markdown inserts with "target" (a BlockNodeAddress like \{kind:"block", nodeType, nodeId}) and "placement" (before, after, insideStart, insideEnd). Without a target, content appends at the end of the document. IMPORTANT: After a markdown insert, analyze the document context (what kind of document, how titles and body text are styled) and follow up with ONE docx\_mutations call to format inserted blocks so they look like they belong. Each format.apply step accepts "inline" (fontFamily, fontSize, bold, underline, color), "alignment", and "scope" in the same step. Use scope: "block" so formatting covers the entire paragraph. Copy the exact property values from the existing get\_content blocks (fontFamily, fontSize, color, alignment, bold, underline). Do NOT invent values: use what the blocks show. Also supports replace, delete, and undo/redo. For replace and delete, pass a "ref" from docx\_search or docx\_get\_content blocks. A search ref covers only the matched substring; a block ref covers the entire block text, so use block refs when rewriting or shortening whole paragraphs. For multi-step redlines or whole-clause rewrites, prefer docx\_mutations with where:\{by:"block", nodeType, nodeId} from docx\_get\_content action "blocks" includeText:true rather than relying on text selectors. Refs expire after any mutation; always re-search before the next edit. For 2+ edits that must succeed or fail atomically, use docx\_mutations instead. Supports "dryRun" to preview changes and "changeMode: tracked" to record edits as tracked changes (not supported for markdown/html inserts). Do NOT build "target" objects manually when a ref is available; prefer "ref" for simpler, more reliable targeting. ## Parameters **action** `string, enum: 'delete' | 'insert' | 'redo' | 'replace' | 'undo'` *required* The action to perform. One of: delete, insert, redo, replace, undo. **force** `boolean` Bypass confirmation checks. **changeMode** `string, enum: 'direct' | 'tracked'` Edit mode: "direct" applies changes immediately, "tracked" records as suggestions. **dryRun** `boolean` Preview the result without applying changes. **target** Target address. For inline/set\_style: prefer 'ref' from docx\_search, or use \{kind:'selection', start:\{kind:'text', blockId, offset}, end:\{kind:'text', blockId, offset}}. For paragraph actions (set\_alignment, set\_indentation, set\_spacing, set\_direction, set\_flow\_options): use \{kind:'block', nodeType:'paragraph'|'heading'|'listItem', nodeId:'\'}. **value** `string` Text content to insert. Only for action 'insert'. Omit for other actions. **type** `string, enum: 'text' | 'markdown' | 'html'` Content format: 'text' (default), 'markdown', or 'html'. Only for action 'insert'. Omit for other actions. **ref** `string` Handle ref from docx\_search result (pass handle.ref value directly). Preferred over building a target object. **content** Document fragment to insert (structured content). Only for actions 'insert', 'replace'. Omit for other actions. **placement** `string, enum: 'before' | 'after' | 'insideStart' | 'insideEnd'` Where to place content relative to target: 'before', 'after', 'insideStart', or 'insideEnd'. Only for action 'insert'. Omit for other actions. **nestingPolicy** `object` Controls nesting behavior. tables: 'allow' permits inserting tables inside other tables. Only for actions 'insert', 'replace'. Omit for other actions. **text** `string` Replacement text content. Only for action 'replace'. Omit for other actions. **behavior** `string, enum: 'selection' | 'exact'` Delete behavior: 'selection' (default) or 'exact'. Only for action 'delete'. Omit for other actions. **documentId** `string` *required* The HERO documentId of the docx to target. # Docx format Source: https://developers.myhero.so/mcp/tools/word-files/docx-format Change text and paragraph formatting. To format multiple items at once, use docx_mutations with format.apply steps instead of calling this tool… `docx_format` Change text and paragraph formatting. To format multiple items at once, use docx\_mutations with format.apply steps instead of calling this tool repeatedly. Use require "all" with a node selector to format every heading or paragraph in one batch. Use this tool for single-item formatting when you have a valid ref or nodeId. Action "inline" applies character formatting (bold, italic, underline, color, fontSize, fontFamily, highlight, strike, vertAlign) to a text range via "ref". Action "set\_style" applies a named paragraph style by styleId (get available styles from docx\_get\_content info). Actions "set\_alignment", "set\_indentation", "set\_spacing", "set\_direction", and "set\_flow\_options" change paragraph-level properties and require a block target: \{kind:"block", nodeType:"paragraph", nodeId:"\"}, NOT a ref. Use "set\_flow\_options" with pageBreakBefore:true to start a paragraph on a new page. Supports "dryRun" and "changeMode: tracked" for inline formatting. Paragraph-level actions do NOT support tracked changes. Do NOT use a search ref for paragraph-level actions; they require a block target with nodeId. Do NOT use \{kind:"block", start:\{kind:"nodeEdge",...}} or selection-like structures for paragraph actions. ONLY \{kind:"block", nodeType, nodeId} is accepted. Do NOT issue multiple docx\_format calls in parallel; each call invalidates refs for subsequent calls. ## Parameters **action** `string, enum: 'inline' | 'set_alignment' | 'set_direction' | 'set_flow_options' | 'set_indentation' | 'set_spacing' | 'set_style'` *required* The action to perform. One of: inline, set\_alignment, set\_direction, set\_flow\_options, set\_indentation, set\_spacing, set\_style. **force** `boolean` Bypass confirmation checks. **changeMode** `string, enum: 'direct' | 'tracked'` Edit mode: "direct" applies changes immediately, "tracked" records as suggestions. **dryRun** `boolean` Preview the result without applying changes. **target** `object` Selection target: \{kind:'selection', start:\{kind:'text', blockId, offset}, end:\{kind:'text', blockId, offset}}. Use 'ref' instead when you have a search result handle. Required for actions 'set\_style', 'set\_alignment', 'set\_indentation', 'set\_spacing', 'set\_flow\_options', 'set\_direction'. **inline** `object` Inline formatting properties to apply. Set a property to apply it, use null to clear it. Example: \{bold: true, italic: true} or \{bold: null} to remove bold. Only for action 'inline'. Omit for other actions. **ref** `string` Handle ref string from a docx\_search result. Pass the handle.ref value directly (e.g. 'text:eyJ...'). Preferred over 'target' for inline formatting. Only for action 'inline'. Omit for other actions. **styleId** `string` Named paragraph style ID (e.g. 'Normal', 'Heading1', 'BodyText'). Use docx\_search to find a nearby paragraph, then inspect its style to determine the correct styleId. Required for action 'set\_style'. **alignment** `string, enum: 'left' | 'center' | 'right' | 'justify'` Required for action 'set\_alignment'. **left** `number` Left indentation in twips (1440 = 1 inch). Only for action 'set\_indentation'. Omit for other actions. **right** `number` Right indentation in twips (1440 = 1 inch). Only for action 'set\_indentation'. Omit for other actions. **firstLine** `number` First line indent in twips. Cannot be combined with hanging. Only for action 'set\_indentation'. Omit for other actions. **hanging** `number` Hanging indent in twips. Cannot be combined with firstLine. Only for action 'set\_indentation'. Omit for other actions. **before** `number` Space before paragraph in twips (20 twips = 1pt). Only for action 'set\_spacing'. Omit for other actions. **after** `number` Space after paragraph in twips (20 twips = 1pt). Only for action 'set\_spacing'. Omit for other actions. **line** `number` Line spacing value. Meaning depends on lineRule. Must be provided together with lineRule. Only for action 'set\_spacing'. Omit for other actions. **lineRule** `string, enum: 'auto' | 'exact' | 'atLeast'` Line spacing rule. Required when 'line' is set. Only for action 'set\_spacing'. Omit for other actions. **contextualSpacing** `boolean` Only for action 'set\_flow\_options'. Omit for other actions. **pageBreakBefore** `boolean` Only for action 'set\_flow\_options'. Omit for other actions. **suppressAutoHyphens** `boolean` Only for action 'set\_flow\_options'. Omit for other actions. **direction** `string, enum: 'ltr' | 'rtl'` Required for action 'set\_direction'. **alignmentPolicy** `string, enum: 'preserve' | 'matchDirection'` Only for action 'set\_direction'. Omit for other actions. **documentId** `string` *required* The HERO documentId of the docx to target. # Docx get content Source: https://developers.myhero.so/mcp/tools/word-files/docx-get-content Read document content in various formats. Call this first in any workflow to understand document structure before making edits. Action "blocks" returns… `docx_get_content` Read document content in various formats. Call this first in any workflow to understand document structure before making edits. Action "blocks" returns structured block data with nodeId, nodeType, textPreview, optional full text when includeText:true, formatting properties (fontFamily, fontSize, color, bold, underline, alignment), and ref handles for immediate use with docx\_edit or docx\_format. When you need to evaluate or rewrite existing paragraphs or clauses, prefer action "blocks" with includeText:true so you can identify the correct block and then target it by nodeId. Action "text" and "markdown" return the full document as plain text or Markdown. Action "html" returns HTML. Action "info" returns document metadata: word count, paragraph count, page count, outline, available styles, and capability flags. The "blocks" action supports pagination via "offset" and "limit", and filtering via "nodeTypes". Other actions ignore these parameters. This tool never modifies the document. Do NOT call docx\_edit or docx\_format without first reading blocks to get valid refs and formatting reference values. ## Parameters **action** `string, enum: 'blocks' | 'extract' | 'html' | 'info' | 'markdown' | 'text'` *required* The action to perform. One of: blocks, extract, html, info, markdown, text. **unflattenLists** `boolean` When true, flattens nested list structures in output. Default: false. Only for action 'html'. Omit for other actions. **offset** `number` Number of blocks to skip. Default: 0. Only for action 'blocks'. Omit for other actions. **limit** `number` Maximum blocks to return. Omit for all blocks. Only for action 'blocks'. Omit for other actions. **nodeTypes** `array\` Filter by block types (e.g. \['paragraph', 'heading']). Omit for all types. Only for action 'blocks'. Omit for other actions. **includeText** `boolean` When true, includes the full flattened block text in each block entry. Only for action 'blocks'. Omit for other actions. **documentId** `string` *required* The HERO documentId of the docx to target. # Docx list Source: https://developers.myhero.so/mcp/tools/word-files/docx-list Create and manipulate bullet and numbered lists. Most actions require a list-item target: . Exceptions: "create" and "attach" operate on paragraph targets… `docx_list` Create and manipulate bullet and numbered lists. Most actions require a list-item target: \{kind:"block", nodeType:"listItem", nodeId:"\"}. Exceptions: "create" and "attach" operate on paragraph targets (they turn paragraphs into list items). Find nodeIds via docx\_get\_content(\{action:"blocks"}): pick listItem blocks for most actions, paragraph blocks for create/attach. CREATE & CONVERT: • "create": make a NEW list from paragraphs. Two modes: mode:"empty" with at:\{kind:"block", nodeType:"paragraph", nodeId} converts a single paragraph; mode:"fromParagraphs" with target:\{from:\{...paragraph block address}, to:\{...paragraph block address}} converts a range: ALL paragraphs between from and to become items, so make sure no other content sits between them. Pass a preset ("disc"|"circle"|"square"|"dash" for bullets; "decimal"|"decimalParenthesis"|"lowerLetter"|"upperLetter"|"lowerRoman"|"upperRoman" for ordered) or a custom style. Use "create" to start a fresh list: NOT to extend an existing one (use "attach" for that). • "attach": add paragraphs to an EXISTING list, inheriting its numbering definition. Pass target:\{paragraph block address} (or \{from, to} range of paragraphs) + attachTo:\{kind:"block", nodeType:"listItem", nodeId:"\"} + optional level:0..8. Use this to extend a list or as the second half of a merge workflow (see "join" below). • "set\_type": convert an existing list between ordered and bullet. Pass target:\{listItem} + kind:"ordered" or "bullet". Adjacent compatible sequences are merged automatically to preserve continuous numbering. • "detach": convert a list item back to a plain paragraph. Pass target:\{listItem}. ITEMS & NESTING: • "insert": add a new list item adjacent to an existing item in the same list. Pass target:\{listItem} + position:"before"|"after" + optional text. Use this (NOT docx\_create) to add items to an existing list. • "indent" / "outdent": bump the target item's nesting level by one (0-8 range). Pass target:\{listItem}. • "set\_level": jump the target item to an explicit level. Pass target:\{listItem} + level:0..8. NUMBERING (ordered lists): • "set\_value": restart numbering at the target. Pass target:\{listItem} + value:\ (e.g. value:1 to start over) or value:null to clear a previous override. Mid-sequence targets are atomically split off into their own sequence. • "continue\_previous": make the target's sequence continue numbering from the nearest compatible previous sequence (same abstract definition). Pass target:\{listItem of the sequence you want to renumber}. Fails with NO\_COMPATIBLE\_PREVIOUS or INCOMPATIBLE\_DEFINITIONS if no matching prior sequence exists. SEQUENCE SHAPE (merge / split): • "merge": merge the target's sequence with an adjacent one into one continuous list. Pass target:\{listItem} + direction:"withPrevious" or "withNext". Absorbed items adopt the absorbing sequence's numbering definition, and empty paragraphs between the two sequences are removed so numbering flows continuously. • "split": split the target's sequence at the target item into two independent lists. The target and everything after become a new sequence that restarts numbering at 1. Pass target:\{listItem}; add restartNumbering:false to keep the count continuing instead of restarting. ## Parameters **action** `string, enum: 'attach' | 'continue_previous' | 'create' | 'detach' | 'indent' | 'insert' | 'merge' | 'outdent' | 'set_level' | 'set_type' | 'set_value' | 'split'` *required* The action to perform. One of: attach, continue\_previous, create, detach, indent, insert, merge, outdent, set\_level, set\_type, set\_value, split. **force** `boolean` Bypass confirmation checks. **changeMode** `string, enum: 'direct' | 'tracked'` Edit mode: "direct" applies changes immediately, "tracked" records as suggestions. **dryRun** `boolean` Preview the result without applying changes. **target** `object` The target list item. For 'insert': the item to insert relative to. For 'create' with mode 'fromParagraphs': use nodeType 'paragraph' instead. Format: \{kind:'block', nodeType:'listItem', nodeId:'\'}. Required for actions 'insert', 'attach', 'detach', 'indent', 'outdent', 'merge', 'split', 'set\_level', 'set\_value', 'continue\_previous', 'set\_type'. **position** `string, enum: 'before' | 'after'` Required. Insert position relative to target: 'before' or 'after'. Required for action 'insert'. **text** `string` Text content for the new list item. Only for action 'insert'. Omit for other actions. **input** `object` Operation input as JSON object. **nodeId** `string` Node ID of the target list item. **mode** `string, enum: 'empty' | 'fromParagraphs'` Required. 'fromParagraphs' converts existing paragraphs into list items: each paragraph becomes one item, so create one paragraph per item first. 'empty' creates a new empty list at 'at'. Required for action 'create'. **at** `object` Required when mode is 'empty'. The paragraph to create the list at. Format: \{kind:'block', nodeType:'paragraph', nodeId:'\'}. Only for action 'create'. Omit for other actions. **kind** `string, enum: 'ordered' | 'bullet'` List type: 'bullet' for bullet points, 'ordered' for numbered lists. Required for action 'set\_type'. **level** `number` List nesting level (0-8). 0 is the top level. Required for action 'set\_level'. **preset** `string, enum: 'decimal' | 'decimalParenthesis' | 'lowerLetter' | 'upperLetter' | 'lowerRoman' | 'upperRoman' | 'disc' | 'circle' | 'square' | 'dash'` Predefined list style preset. Overrides 'kind' with a specific numbering or bullet format. Only for action 'create'. Omit for other actions. **style** `object` Only for action 'create'. Omit for other actions. **sequence** Only for action 'create'. Omit for other actions. **attachTo** `object` Required for action 'attach'. **direction** `string, enum: 'withPrevious' | 'withNext'` Required for action 'merge'. **restartNumbering** `boolean` Only for action 'split'. Omit for other actions. **value** `object` Required for action 'set\_value'. **continuity** `string, enum: 'preserve' | 'none'` Numbering continuity: 'preserve' keeps numbering; 'none' restarts. Only for action 'set\_type'. Omit for other actions. **documentId** `string` *required* The HERO documentId of the docx to target. # Docx mutations Source: https://developers.myhero.so/mcp/tools/word-files/docx-mutations All steps succeed or all fail; no partial application. Execute multiple operations atomically in one batch. Use this for any workflow needing 2+ changes… `docx_mutations` All steps succeed or all fail; no partial application. Execute multiple operations atomically in one batch. Use this for any workflow needing 2+ changes. Supported step types: text (text.rewrite, text.insert, text.delete), format (format.apply), create (create.heading, create.paragraph, create.table), assert. Each step has an id, an op, a "where" clause for targeting (\{by:"select", select:\{...}, require:"first"|"exactlyOne"|"all"} or \{by:"ref", ref:"..."} or \{by:"block", nodeType:"paragraph", nodeId:"..."}), and "args" with operation-specific parameters. Use \{by:"block", nodeType, nodeId} when you want to rewrite, delete, format, or anchor against a whole known block from docx\_get\_content action "blocks" without relying on text matching. For full-paragraph or full-clause rewrites, first call docx\_get\_content with action:"blocks" and includeText:true, then rewrite the matching block by nodeId. Use \{by:"select"} only for substring edits, discovery, or insertion relative to a sentence fragment; do NOT use a shortened text selector to replace an entire known block. For create steps, "where" targets an existing anchor block and args.position ("before" or "after") controls placement. Sequential creates targeting the same anchor maintain correct order via internal position mapping. For format.apply with require "all", use a node selector to format every heading or paragraph at once: \{by:"select", select:\{type:"node", nodeType:"heading"}, require:"all"}. Selectors resolve at compile time (before execution). This means format.apply steps CANNOT target content created by earlier create steps in the same batch. Split creates and formatting into separate batches: first a mutations call with creates, then a mutations call with format.apply. Action "preview" dry-runs the plan. Action "apply" executes it. If a selector matches nothing, the failure reports the step id plus selector details so you can retry with a shorter or more distinctive anchor. Do NOT create two steps that target overlapping text in the same block; combine them into a single text.rewrite step. ## Parameters **action** `string, enum: 'apply' | 'preview'` *required* The action to perform. One of: apply, preview. **expectedRevision** `string` Document revision for optimistic concurrency. Mutation fails if document was modified since this revision. Only for action 'preview'. Omit for other actions. **atomic** `boolean` *required* Must be true. All steps execute as one atomic transaction. **changeMode** `string, enum: 'direct' | 'tracked'` *required* Required. Use 'direct' for immediate edits or 'tracked' for suggestions. Must always be provided. **steps** `array\` *required* Ordered array of mutation steps. Each step needs 'op' (text.rewrite, text.insert, text.delete, format.apply, or assert) and a 'where' targeting clause. **force** `boolean` Bypass confirmation checks. Only for action 'apply'. Omit for other actions. **documentId** `string` *required* The HERO documentId of the docx to target. # Docx search Source: https://developers.myhero.so/mcp/tools/word-files/docx-search Find text patterns or nodes in the document and get ref handles for targeting edits and formatting. Refs expire after any mutation that changes the… `docx_search` Find text patterns or nodes in the document and get ref handles for targeting edits and formatting. Refs expire after any mutation that changes the document. Re-search before the next edit when using individual tools (docx\_edit, docx\_format). Within a docx\_mutations batch, selectors in "where" clauses resolve automatically at compile time; no manual re-searching needed between steps. Text search returns handle.ref covering only the matched substring. Node search finds blocks by type (paragraph, heading, table, listItem, etc.). The "require" parameter controls match cardinality: "first" returns one match, "all" returns every match, "exactlyOne" fails if not exactly one match. Supports scoping via "within" to search inside a single block. Do NOT use regex or markdown formatting markers (#, \*\*, etc.) in search patterns; patterns are plain text only. Do NOT use this tool when you already have a ref from docx\_get\_content blocks or docx\_create; use that ref directly. ## Parameters **select** *required* Search selector. Use \{type:'text', pattern:'...'} for text search or \{type:'node', nodeType:'paragraph'|'heading'|...} for node search. **within** `object` Limit search scope to within a specific block: \{kind:'block', nodeType:'...', nodeId:'...'}. **require** `string, enum: 'any' | 'first' | 'exactlyOne' | 'all'` Match cardinality: 'any' (all matches), 'first' (only first), 'exactlyOne' (fail if != 1), 'all' (fail if 0). **mode** `string, enum: 'strict' | 'candidates'` Search mode: 'strict' (default, exact matching) or 'candidates' (returns scored potential matches). **includeNodes** `boolean` When true, includes full node data in results. Default: false. **limit** `number` Maximum number of matches to return. **offset** `number` Number of matches to skip for pagination. **documentId** `string` *required* The HERO documentId of the docx to target. # Docx track changes Source: https://developers.myhero.so/mcp/tools/word-files/docx-track-changes Review and resolve tracked changes (insertions, deletions, format changes) in the document. Action "list" returns all tracked changes with optional… `docx_track_changes` Review and resolve tracked changes (insertions, deletions, format changes) in the document. Action "list" returns all tracked changes with optional filtering by type (insert, delete, format) and pagination (limit, offset). Each change includes an ID, type, author, timestamp, and content preview. Action "decide" accepts or rejects changes. Pass decision:"accept" to apply the change permanently, or decision:"reject" to discard it. Target a single change with \{id:"\"} or all changes at once with \{scope:"all"}. Do NOT use this tool unless the document has tracked changes. Use docx\_get\_content info to check the tracked change count first. ## Parameters **action** `string, enum: 'decide' | 'list'` *required* The action to perform. One of: decide, list. **limit** `number` Maximum number of tracked changes to return. Only for action 'list'. Omit for other actions. **offset** `number` Number of tracked changes to skip for pagination. Only for action 'list'. Omit for other actions. **type** `string, enum: 'insert' | 'delete' | 'format'` Filter by change type: 'insert', 'delete', or 'format'. Only for action 'list'. Omit for other actions. **force** `boolean` Bypass confirmation checks. Only for action 'decide'. Omit for other actions. **changeMode** `string, enum: 'direct' | 'tracked'` Edit mode: "direct" applies changes immediately, "tracked" records as suggestions. Only for action 'decide'. Omit for other actions. **decision** `string, enum: 'accept' | 'reject'` Required for action 'decide'. **target** Required for action 'decide'. **documentId** `string` *required* The HERO documentId of the docx to target. # Export word document Source: https://developers.myhero.so/mcp/tools/word-files/export-word-document Save an existing HERO document as a Word (.docx) file in the project: the same file Export to Word makes, with clause numbers, tables and placeholder… `export_word_document` Save an existing HERO document as a Word (.docx) file in the project: the same file Export to Word makes, with clause numbers, tables and placeholder values filled in, and no AI rewriting. For 'export X to Word' or 'send me X as a .docx'. It lands beside the source unless you name a project or folder; the user downloads it from HERO. ## Parameters **sourceDocumentId** `string` *required* The HERO document to export. **title** `string` Name of the Word file in HERO. Defaults to "\ (Word)". **projectId** `string` Project to save it in. Defaults to the source's. **parentId** `string` Folder to save it in. Defaults to the source's. # Finish with summary Source: https://developers.myhero.so/mcp/tools/workflows/finish-with-summary Call this when you have completed all requested work. Provide a brief summary of what was done. This signals to the frontend that the agent run is… `finish_with_summary` Call this when you have completed all requested work. Provide a brief summary of what was done. This signals to the frontend that the agent run is complete and renders a summary card. After calling this tool, do NOT call any more tools or produce additional content. ## Parameters **summary** `string` *required* A concise plain-language summary of what was accomplished (1-3 sentences), as plain text: no markdown or @clause-style syntax, since a later step may put it in a table cell, an email or a notification. **actionsPerformed** `array\` Optional list of specific actions taken (e.g. 'Created 5 clause blocks', 'Updated table schema'). **notable** `boolean` Whether this run is worth telling the user about. Default true. Set false when you checked something and found nothing to do — an automation that watches for a condition should complete quietly on the runs where the condition did not hold, rather than notifying every time it looks. # Plan Source: https://developers.myhero.so/mcp/tools/workflows/plan Show the user a checklist of the steps in a long job (several documents, a project built up, a dashboard with many parts), and update it as steps finish… `plan` Show the user a checklist of the steps in a long job (several documents, a project built up, a dashboard with many parts), and update it as steps finish. A short job needs none: just do it. ## Parameters **title** `string` Short title for the plan (e.g. 'Draft NDA Agreement'). **steps** `array\` *required* Ordered list of plan steps. # Webhooks Source: https://developers.myhero.so/webhooks HERO can call your endpoint when a workflow runs, and your service can call HERO to start one. Webhooks go both ways, and each direction is part of an automation rather than a subscription you configure separately. ## Your service calls HERO Post to an automation's webhook URL and it runs, with whatever JSON you sent readable by its steps. See [Starting a workflow from your own service](/automations) for the URL, the secret, what you may post and how a step reads it. ## HERO calls your service Add a **Send a webhook** step to an automation. It posts to any HTTPS URL you name, with a body you write — so what HERO sends is whatever that workflow decided, rather than a fixed event schema. Because the body is a normal text field, it can carry anything the run knows: what triggered it, what an earlier step produced, or a value read from a table. A few things worth knowing about the outbound direction: * **HTTPS only.** The URL is resolved before the request and the connection is pinned to the addresses that resolved, so a hostname that later points somewhere else cannot redirect the call. * **Every send is recorded** on the run, because a request that has left HERO cannot be undone. ## Stripe HERO consumes Stripe's own webhooks at `POST /api/webhook/stripe` for subscription and invoice events. That endpoint is for billing and is not related to automations. # Working with the API Source: https://developers.myhero.so/working-with-the-api Conventions, base URL, and your first request. > [!NOTE] > > This page covers direct HTTP calls to the REST API. > > If you're connecting an AI tool via MCP (Cursor, VS Code, Claude Desktop, Claude Code), see [Connect HERO to your AI tool](mcp/overview) for the client-side setup. ## Base URL ``` https://app.myhero.so ``` All endpoints are scoped under `/api`. Example: `https://app.myhero.so/api/document/{documentId}`. ## Authentication Every request requires a bearer token: ```http theme={null} Authorization: Bearer hero_ak_ ``` See [Authentication](authentication) for how to generate one. ## Your first request ```bash cURL theme={null} curl https://app.myhero.so/api/workspace/default \ -H "Authorization: Bearer $HERO_API_KEY" ``` ```ts Node.js theme={null} const res = await fetch("https://app.myhero.so/api/workspace/default", { headers: { Authorization: `Bearer ${process.env.HERO_API_KEY}` }, }); const workspaces = await res.json(); console.log(workspaces); ``` ```python Python theme={null} import os import requests r = requests.get( "https://app.myhero.so/api/workspace/default", headers={"Authorization": f"Bearer {os.environ['HERO_API_KEY']}"}, ) print(r.json()) ``` ## Conventions * **HTTP verbs** — standard `GET` / `POST` / `PUT` / `PATCH` / `DELETE`. \ Read endpoints are GET; mutations carry their body as JSON. * **Content-Type** — set `Content-Type: application/json` on every request with a body. Responses are always JSON unless the endpoint streams (`text/event-stream`) or returns a binary payload (e.g. exports). * **IDs** — every resource ID is a UUID string. \ Don't assume incrementing integers. ## Response shape Successful responses wrap the payload in a top-level `data` field: ```json theme={null} { "data": { "_id": "ws_...", "name": "Acme", "isPersonal": false } } ``` List endpoints return arrays the same way: ```json theme={null} { "data": [ { "_id": "doc_..." }, { "_id": "doc_..." } ] } ``` A handful of streaming/binary endpoints break this pattern — they're called out per-route in the [API Reference](api-reference). ## Errors All errors return a uniform shape: ```json theme={null} { "error": "ValidationError", "message": "Request failed schema validation", "details": [...] } ``` See [Errors](errors) for the full status code list and `error` codes. ## Rate limiting Requests are throttled per-IP using IETF [RateLimit headers](https://datatracker.ietf.org/doc/draft-ietf-httpapi-ratelimit-headers/) — every response includes `RateLimit-Limit`, `RateLimit-Remaining`, and `RateLimit-Reset`. \ When you exceed a window you get a `429` with a `Retry-After` header. Default budget is **600 requests per 15 minutes**; specific surfaces are tighter (creation routes, export jobs, auth). Treat the headers as the authoritative source — limits get tuned over time. ## Streaming endpoints Some routes stream their response as Server-Sent Events (`Content-Type: text/event-stream`) — most notably [`POST /ai-agent/stream`](api-reference/ai/ai-stream) and [`POST /ai-agent/generate-html`](api-reference/ai/ai-generate-html-block). Errors found before a stream starts (validation, plan, quota) come back as ordinary JSON with their status code, so check `Content-Type` before reading events; lines starting with `:` are heartbeats. \ See the [streaming demo](demos#3-stream-an-ai-agent-and-watch-it-use-tools) for a full Node.js client that parses chunks event-by-event. ## Versioning The HERO API does not use a version prefix today. \ Breaking changes are announced in the [changelog](changelog) and gated behind opt-in headers when introduced.