{"ok":true,"site":{"host":"mdoc.modesthumanbrands.com","url":"https://mdoc.modesthumanbrands.com/new/template","type":"live","desc":"MDoc","tools":[{"name":"get_wizard_state","kind":"answer","impl":"imperative","description":"Where the \"New document\" wizard is: current step, selected template, what is still missing before a document can be created, server validation errors, the amount due (billing templates) and the created document if any. Call this first and after changes.","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/new/template"},{"name":"list_templates","kind":"answer","impl":"imperative","description":"Lists the document templates the server offers (id, label, shortLabel, category, description, sampleUrl).","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/new/template"},{"name":"get_template_schema","kind":"answer","impl":"imperative","description":"Returns the JSON Schema of a template (defaults to the selected one): fields, types, enums, required lists and layout hints. Branding (organization) is resolved by the server and is not part of it.","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{"templateId":{"type":"string"}}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/new/template"},{"name":"get_form_values","kind":"answer","impl":"imperative","description":"Returns the current form values: `form` as typed so far, and `payload` as it would be sent to the API.","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/new/template"},{"name":"validate_form","kind":"act","impl":"imperative","description":"Checks the form against the template schema and the required owner ids. Returns the list of missing fields (empty means ready to create).","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/new/template"},{"name":"get_preview_status","kind":"answer","impl":"imperative","description":"Status of the live PDF preview: loading, ready, page count, and the last error. `hints` lists fields the server replaced with placeholders because their value was invalid.","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/new/template"},{"name":"select_template","kind":"act","impl":"imperative","description":"Selects a template (see list_templates), loads its schema and applies defaults. Resets previously entered values.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"templateId":{"type":"string"}},"required":["templateId"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/new/template"},{"name":"go_to_step","kind":"act","impl":"imperative","description":"Navigates the wizard. Steps: template, details, review. The router may redirect (e.g. review needs a created document).","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"step":{"type":"string","enum":["template","details","review"]}},"required":["step"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/new/template"},{"name":"set_fields","kind":"act","impl":"imperative","description":"Sets form fields in one call, all or nothing. Keys are dotted paths from the template schema (list rows by index), values are strings, numbers or booleans. Example: {\"recipient.name\":\"Chai Theory\",\"project.deliverables.0.rate\":120000,\"financials.isDiscountPercentage\":true}. Use add_row first for new list rows.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"fields":{"type":"object","additionalProperties":true}},"required":["fields"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/new/template"},{"name":"add_row","kind":"act","impl":"imperative","description":"Appends an empty row to a list in the form (e.g. path \"project.deliverables\" for another service, or a list of points).","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"path":{"type":"string"}},"required":["path"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/new/template"},{"name":"remove_row","kind":"act","impl":"imperative","description":"Removes a row from a list in the form by index. The last remaining row cannot be removed.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"path":{"type":"string"},"index":{"type":"integer","minimum":0}},"required":["path","index"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/new/template"},{"name":"set_organization","kind":"act","impl":"imperative","description":"Sets the organisation profile (Brand step). \"id\" picks the server's branding preset; any other field you set overrides that preset on the generated PDF (untouched fields keep the preset's values) and is cached on this device. Keys: id, name, legalName, entityType, pan, gstin, primary, accent, font, contactEmail, billingEmail, phone, whatsapp, address, tradeRelationship, foundedYear, website, instagram, facebook, linkedin, youtube.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"legalName":{"type":"string"},"entityType":{"type":"string"},"pan":{"type":"string"},"gstin":{"type":"string"},"primary":{"type":"string"},"accent":{"type":"string"},"font":{"type":"string"},"contactEmail":{"type":"string"},"billingEmail":{"type":"string"},"phone":{"type":"string"},"whatsapp":{"type":"string"},"address":{"type":"string"},"tradeRelationship":{"type":"string"},"foundedYear":{"type":"string"},"website":{"type":"string"},"instagram":{"type":"string"},"facebook":{"type":"string"},"linkedin":{"type":"string"},"youtube":{"type":"string"}}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/new/template"},{"name":"set_owner_ids","kind":"act","impl":"imperative","description":"Sets the Notion ids the API requires when saving: userId and contactId (required), projectId (optional).","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"userId":{"type":"string"},"contactId":{"type":"string"},"projectId":{"type":"string"}}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/new/template"},{"name":"create_document","kind":"act","impl":"imperative","description":"Creates the PDF and saves it as a document in Notion. This has a real side effect, so the user is asked to confirm first. Requires validate_form to report no problems.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/new/template"},{"name":"reset_wizard","kind":"act","impl":"imperative","description":"Clears the template, form values and created document and returns to the first step.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/new/template"}],"category":"Productivity & Business","favicon":"/favicons/mdoc.modesthumanbrands.com.png","apiSurface":"spec","toolCount":15}}