Skip to Content
Build with AI

sajn MCP server

Connect an AI assistant to your sajn workspaces over the Model Context Protocol — draft documents, fill them in, manage parties, send for signing, chase signatures, and debug your integration

The sajn MCP Server lets an AI assistant work in your live sajn workspaces — not just look at them. Find and read documents, draft them, fill them in, manage parties, send for signing, chase signatures, and follow status. It also carries the developer tools for debugging an integration: API request logs and outbound webhook deliveries.

Install the sajn app in ChatGPT, or connect the server to Claude Desktop, Claude Code, Cursor, or any other MCP client. Then you run the everyday signing workflow from wherever you already work. It uses the same permission model as the REST API, so an assistant can never do more than you can.

This is not the same as the documentation MCP server at https://www.sajn.se/docs/mcp. That one only searches these docs and needs no login. The sajn MCP server connects to your real account data and requires authentication.

Documentation MCPsajn MCP
URLhttps://www.sajn.se/docs/mcphttps://app.sajn.se/api/mcp
AuthNone (public)OAuth 2.0
DataDocumentation onlyYour live workspaces
Use for"How do I…" questionsWorking on real documents, debugging logs & webhooks

Server URL

https://app.sajn.se/api/mcp

The server is a stateless Streamable HTTP endpoint — every request carries its own bearer token, so any standard remote-MCP client works.

Authentication

The sajn MCP server uses OAuth 2.0. Most MCP clients, such as Claude, ChatGPT, and Cursor, find the server's OAuth settings and start the sign-in themselves. The client opens the sajn consent screen, where you choose what the assistant gets:

  1. Pick a workspace.
  2. Pick a level for that workspace: Läs (read), Skriv (write), or Administrera (administer). Skriv is preselected.
  3. To add another workspace from the same organization, select Lägg till arbetsyta and repeat the first two steps.
  4. On the review step, use the ⋯ menu on a row to change its level, make it the default workspace with Gör till standard, or remove it.
  5. Select Godkänn.

The first workspace you pick is the default unless you change it. There are no tokens to copy or rotate: the client refreshes them for you. The server works on every plan.

A workspace created after you connect is not added to the connection. To include it, reconnect the server and pick it.

Levels and permissions

Each workspace in a connection has its own level:

LevelScopeThe assistant can
Lässajn:readRead everything your role can read in the workspace
Skrivsajn:writeAlso create, change, and send, within your role
Administrerasajn:adminAlso manage members, roles, and settings, within your role

A tool call passes four checks in the workspace it acts in, and each check can only narrow the one before it:

  1. The level you granted for that workspace.
  2. Your role in that workspace.
  3. The workspace's policy for AI agents in Inställningar > AI.
  4. The workspace's AI switch. A workspace with AI turned off refuses every tool call.

An assistant can therefore never do more than you can in that workspace. The tool list shows what your role and the agent policy allow. A call that needs a higher level than you granted returns an error that names the level it needs.

Connections made before the levels existed hold per-resource scopes, such as documents:read, and keep working.

Some tools need a workspace permission as well — most notably the developer tools, which require Manage developer (API logs) or Manage webhooks, so only developers can read raw traffic.

Working in several workspaces

A call acts in the default workspace unless it names another one. When a connection covers more than one workspace, every tool takes an optional workspaceId argument: the workspace's id, slug, or name. The assistant fills it in, so you name the workspace in plain words, such as "create it in Juridik".

  • getCurrentUser lists the connected workspaces and marks the default.
  • A call about an existing document runs in the workspace that holds the document, so you don't name it.
  • Every result names the workspace the call acted in.
  • A workspace outside the connection is refused, and so is a name that two connected workspaces share. The error lists the connected workspaces.

A connection covers workspaces in one organization.

Tools

An MCP client loads every listed tool into every conversation, so the server lists only the 22 everyday tools. Every other tool is reached through findTools. The assistant does this itself: you ask in plain words, and it finds and runs the right tool.

Each tool needs a level in the workspace it acts in, and most also need a permission in your role. Tools marked destructive send, delete, overwrite, or change access, so your client asks you before it runs them.

Everyday tools

ToolLevelWhat it does
createDocumentSkrivCreates a document, blank or from a template
findDocumentsLäsFinds, lists and counts documents, including by what they say or by upcoming renewal
summarizeContentLäsSummarizes a document or template: purpose, parties, key terms, dates and clauses to watch
getDocumentReadinessLäsChecks whether a document is ready to send for signing
getDocumentLäsGets one document's status, dates, parties, owner, source template and tags
sendDocumentSkrivSends a draft for signing to its parties destructive
getSettingsLäsGets a document's or template's settings, such as name, expiry date, invitation message, signing order and reminders
getPartiesLäsGets the parties of a document or template, with contact details, role, signing method and order
addPartySkrivAdds a party to a document or template destructive
getFieldsLäsGets the blocks of a document or template in order
setFieldValuesSkrivSets one or more values the sender fills in destructive
findTemplatesLäsFinds the workspace's templates, optionally filtered by name
getTemplateLäsGets one template
createContactSkrivCreates a contact (a person) in the workspace address book
findContactsLäsFinds contacts by name (partial match), email or phone (exact match)
addDocumentFileSkrivAdds an uploaded PDF or Office file to a document
reportMissingCapabilityLäsTells sajn about something the assistant needed but couldn't do
getCurrentUserLäsGets the connected user, the organization and the connected workspaces
createUploadUrlSkrivCreates a single-use URL to upload a file to
findToolsLäsSearches the tools that are not listed and returns their input schemas
runReadOnlyToolLäsRuns a read-only tool that findTools returned
runToolLevel of the tool it runsRuns a tool that changes data, which findTools returned

Reaching the other tools

  1. findTools takes a description of the task, such as "invite a member", and returns the best-matching tools with their input schemas.
  2. The assistant runs a read-only match with runReadOnlyTool and any other match with runTool.

A call through runTool or runReadOnlyTool passes every check that a direct call passes, including the level of the tool it runs. If findTools returns a match under blockedByPolicy, the workspace's AI agent policy has switched that tool off. An administrator can allow it under Inställningar > AI.

The ChatGPT app works differently: it lists its tools directly and has no findTools. It covers the everyday signing workflow: createDocument, findDocuments, sendPartyReminder, summarizeContent, getDocumentReadiness, getDocument, sendDocument, withdrawDocument, getSettings, updateSettings, getSigningMethods, setCustomFieldValue, getParties, addParty, updateParty, removeParty, getFields, getField, addTextField, updateTextField, addFormField, updateFormField, removeField, getFieldValues, setFieldValues, getDocumentFile, findTemplates, getTemplate, createContact, updateContact, findContactsByCustomField, findContacts, getContact, createCompany, submitForApproval, findActions, dismissAction, snoozeAction, findCustomFields, getUsage, reportMissingCapability, getCurrentUser.

All tools by area

Documents

ToolLevelWhat it does
createDocumentSkrivCreates a document, blank or from a template
findDocumentsLäsFinds, lists and counts documents, including by what they say or by upcoming renewal
sendPartyReminderSkrivSends a manual reminder to one party who has not yet signed destructive
summarizeContentLäsSummarizes a document or template: purpose, parties, key terms, dates and clauses to watch
getDocumentReadinessLäsChecks whether a document is ready to send for signing
startReviewSkrivStarts an AI legal review of a document or template
getReviewStatusLäsGets the status of the latest AI review of a document or template
getDocumentLäsGets one document's status, dates, parties, owner, source template and tags
duplicateDocumentSkrivCopies a document, with its content and parties, into a new draft
archiveDocumentSkrivMoves a document to the archive
unarchiveDocumentSkrivMoves an archived document back to the active document list
deleteDocumentSkrivMoves a document to the trash destructive
restoreDocumentSkrivRestores a document from the trash
setDocumentRetentionHoldSkrivExempts a document from the retention policy, or removes the exemption destructive
sendDocumentSkrivSends a draft for signing to its parties destructive
withdrawDocumentSkrivWithdraws a sent document so it becomes a draft again that can be edited and resent destructive
completeDocumentSkrivCompletes a sent document before every party has signed destructive
addDocumentTagSkrivAdds a tag to a document
removeDocumentTagSkrivRemoves a tag from a document
moveDocumentSkrivMoves a document into or out of a folder
createDocumentShareLinkSkrivReturns a public view link for a document destructive
deleteDocumentShareLinkSkrivTurns off a document's public view link so the URL stops working
getSettingsLäsGets a document's or template's settings, such as name, expiry date, invitation message, signing order and reminders
updateSettingsSkrivChanges a document's or template's settings, such as name, expiry date or reminders destructive
getDocumentAuditLogLäsGets a document's audit trail
getVersionHistoryLäsGets the version history of a document or template
getLinkedDocumentsLäsGets the documents linked to a document, such as amendments and renewals
linkDocumentsSkrivLinks two documents as an amendment, replacement, renewal or general relation
deleteDocumentLinkSkrivRemoves a link between two documents, such as an amendment or renewal relation, from both documents
scheduleDocumentSendSkrivSchedules a draft to be sent later destructive
cancelScheduledSendSkrivCancels a scheduled send
captureVersionSkrivSaves the current document or template as a version in its history
restoreVersionSkrivRestores a document or template to an earlier version destructive
getDocumentFileLäsGets a download link for the signed PDF, the signing certificate or the original
addDocumentFileSkrivAdds an uploaded PDF or Office file to a document

Content and fields

ToolLevelWhat it does
getFieldsLäsGets the blocks of a document or template in order
getFieldLäsGets one block with its full content, including a form's fields
addTextFieldSkrivAdds a text block for clauses and paragraphs
updateTextFieldSkrivReplaces the content of a text block destructive
addFormFieldSkrivAdds a form block of fields to fill in
updateFormFieldSkrivChanges a form block's columns or fields destructive
addTableFieldSkrivAdds a data table without prices
addProductTableFieldSkrivAdds a price table with quantity, unit and VAT
removeFieldSkrivRemoves a block with everything in it destructive
moveFieldSkrivMoves a block to another position
setFieldVisibilityRuleSkrivShows or hides a block depending on a yes/no or choice custom field
replaceTextSkrivReplaces wording inside a text block destructive
insertBlocksSkrivInserts paragraphs, headings, lists or tables into a text block
deleteBlocksSkrivDeletes paragraphs, list items, columns or tables inside a text block destructive
moveFieldAfterSkrivMoves a block to right after another block
setFieldMetaSkrivSets a block's settings, such as section style, visibility rule or lock destructive
setVariableSkrivSets a variable in a text block that the sender fills in destructive
getPdfFieldsLäsGets the fields placed on uploaded PDFs
addPdfFieldSkrivAdds a field on top of an uploaded PDF page
updatePdfFieldSkrivMoves, resizes or changes a field on an uploaded PDF
removePdfFieldSkrivRemoves fields from uploaded PDFs, with their values destructive
addSignatureFieldsSkrivAdds a signature box per party where an uploaded PDF has signature lines
getFieldValuesLäsGets the values in form blocks and PDF fields, and who fills each one
setFieldValuesSkrivSets one or more values the sender fills in destructive

setFieldValues writes values in form blocks and in fields on uploaded PDFs, both the PDF's own form fields and fields placed on top of it. getFieldValues lists each value with who fills it. A value assigned to a party is read-only: that party fills it in when signing.

Parties

ToolLevelWhat it does
getSigningMethodsLäsLists the signing methods and identity checks this account can use
getPartiesLäsGets the parties of a document or template, with contact details, role, signing method and order
addPartySkrivAdds a party to a document or template destructive
updatePartySkrivChanges a party on a document or template destructive
removePartySkrivRemoves a party from a document or template destructive

Signing methods and eID schemes are enabled market by market. Call getSigningMethods before setting a party's signing method or identity check, rather than assuming a fixed list.

Approvals

ToolLevelWhat it does
findPendingApprovalsLäsFinds the documents waiting for your approval, with the approval chain
submitForApprovalSkrivSubmits a draft for approval before it is sent destructive
approveDocumentSkrivApproves a document waiting for your approval destructive
rejectDocumentSkrivRejects a document waiting for your approval destructive
getDocumentApprovalLäsGets a document's approval request and chain
updateApprovalStepsSkrivChanges the approvers of a document waiting for approval destructive
cancelApprovalSkrivCancels a pending approval so the document becomes a draft again
sendApprovedDocumentSkrivSends a fully approved document for signing destructive
getTemplateApprovalLäsGets the approval chain a template gives its documents
setTemplateApprovalSkrivSets the approval chain a template gives its documents

Comments

ToolLevelWhat it does
getCommentsLäsGets the comment threads on a document or template
createCommentSkrivStarts a comment thread on a document or template
replyToCommentSkrivReplies in a comment thread destructive
updateCommentSkrivChanges a comment you wrote
deleteCommentSkrivDeletes a comment you wrote destructive
deleteCommentThreadSkrivDeletes a whole comment thread with all its messages destructive
resolveCommentThreadSkrivMarks a comment thread as resolved, closing it while keeping its messages
reopenCommentThreadSkrivReopens a resolved comment thread
setCommentVisibilitySkrivShares a comment thread with the parties, or makes it internal again destructive
acceptCommentSuggestionSkrivAccepts a change suggestion from an AI review or a party
rejectCommentSuggestionSkrivDismisses a change suggestion from an AI review or a party

Folders, tags and custom fields

ToolLevelWhat it does
findFoldersLäsFinds folders on one level of the folder tree
createFolderSkrivCreates a folder for documents or templates
updateFolderSkrivRenames a folder
moveFolderSkrivMoves a folder with everything in it
deleteFolderSkrivDeletes an empty folder destructive
findTagsLäsLists the workspace's tags
createTagSkrivCreates a tag in the workspace
updateTagSkrivRenames or recolors a tag, or changes where it can be used
deleteTagSkrivDeletes a tag and removes it everywhere destructive
getCustomFieldStatisticsLäsShows how one custom field's values are spread across signed documents
setCustomFieldValueSkrivSets or clears a custom field's value on a document, template or contact destructive
findCustomFieldsLäsLists the workspace's custom fields on documents and contacts
createCustomFieldSkrivCreates a custom field for documents or contacts
updateCustomFieldSkrivChanges a custom field
deleteCustomFieldSkrivDeletes a custom field with every value saved in it destructive

Actions, reminders and notifications

ToolLevelWhat it does
findActionsLäsFinds open cards in the Åtgärder feed, such as reminders, deadline extensions and renewals
acceptActionSkrivAccepts a card in the Åtgärder feed and runs it destructive
dismissActionSkrivDismisses a card in the Åtgärder feed destructive
snoozeActionSkrivPostpones a card in the Åtgärder feed
findNotificationsLäsFinds your in-app notifications
markNotificationsReadSkrivMarks notifications as read: the given ids from findNotifications, or every unread notification with markAllRead
createReminderSkrivCreates a personal reminder for a date
createWatchSkrivCreates a standing watch that adds cards to your Åtgärder feed
findWatchesLäsFinds your active watches
updateWatchSkrivChanges a watch
deleteWatchSkrivDeletes a watch

Templates

ToolLevelWhat it does
findTemplatesLäsFinds the workspace's templates, optionally filtered by name
getTemplateLäsGets one template
createTemplateSkrivCreates a new, empty template
duplicateTemplateSkrivDuplicates a template
deleteTemplateSkrivDeletes a template permanently destructive
setTemplateLockSkrivLocks or unlocks a template
setTemplateVisibilitySkrivSets who in the workspace can see and use a template
setTemplateSharingSkrivShares a template read-only with other workspaces, or stops sharing it destructive
addTemplateTagSkrivAdds a tag to a template
removeTemplateTagSkrivRemoves a tag from a template
moveTemplateSkrivMoves a template into or out of a folder
createTemplateFromDocumentSkrivSaves a document as a new template

Contacts, companies and products

ToolLevelWhat it does
createContactSkrivCreates a contact (a person) in the workspace address book
updateContactSkrivUpdates a contact's name, email, phone or company destructive
findContactsByCustomFieldLäsFinds contacts by a custom field
findContactsLäsFinds contacts by name (partial match), email or phone (exact match)
getContactLäsGets one contact
deleteContactSkrivDeletes a contact from the address book destructive
findCompaniesLäsFinds companies in the address book
getCompanyLäsGets one company from the address book
createCompanySkrivCreates a company in the address book
getContactNotesLäsGets the internal notes on a contact
createContactNoteSkrivAdds an internal note to a contact
deleteContactNoteSkrivDeletes a note from a contact destructive
getContactTagsLäsGets the tags on one contact
addContactTagSkrivAdds a tag to a contact
removeContactTagSkrivRemoves a tag from a contact
deleteCompanySkrivDeletes a company from the address book destructive
updateCompanySkrivUpdates a company in the address book
findUnlinkedDocumentPartiesLäsFinds document parties who aren't in the address book yet
createContactsFromPartiesSkrivCreates contacts from document parties and links them
findProductsLäsFinds products in the product library
createProductSkrivCreates a product in the workspace product library
updateProductSkrivUpdates a product in the product library
deleteProductSkrivDeletes a product from the product library destructive

sajn ID

ToolLevelWhat it does
createIdentityCheckSkrivCreates a sajn ID identity check and sends its link by email or SMS destructive
findIdentityChecksLäsFinds sajn ID identity checks
getIdentityCheckLäsGets one sajn ID identity check

Reports

ToolLevelWhat it does
getDocumentStatisticsLäsGets document statistics for a period
createReportSkrivCreates a saved report
updateReportSkrivReplaces a saved report's content
findReportsLäsLists the saved reports

Members and roles

ToolLevelWhat it does
findMembersLäsLists the members of the workspace or the organization
getMemberLäsGets one organization member, with their workspaces and roles
addWorkspaceMemberAdministreraAdds a member to the workspace, or invites a new person by email destructive
setMemberRoleAdministreraChanges a member's role in the organization or the workspace destructive
suspendMemberAdministreraSuspends a member so they can no longer sign in destructive
resumeMemberAdministreraResumes a suspended member
removeMemberAdministreraRemoves a member from the organization or the workspace destructive
findInvitesLäsLists the open invites
inviteMembersAdministreraInvites people by email to the organization and its workspaces destructive
resendInviteAdministreraSends a pending invite again destructive
revokeInviteAdministreraWithdraws a pending invite destructive
findPermissionsLäsLists the workspace and organization permissions and what each one means
findRolesLäsLists the roles with their permissions and member count
createRoleAdministreraCreates a role with a set of permissions destructive
updateRoleAdministreraRenames a role or changes its permissions destructive
deleteRoleAdministreraDeletes a role destructive
findRoleBlueprintsLäsLists the role blueprints: workspace roles defined once for the organization
createRoleBlueprintAdministreraCreates a role blueprint destructive
updateRoleBlueprintAdministreraRenames a role blueprint or changes its permissions destructive
deleteRoleBlueprintAdministreraDeletes a role blueprint destructive
applyRoleBlueprintAdministreraCreates a blueprint as a linked role in one workspace or in all of them
removeRoleFromBlueprintAdministreraUnlinks a workspace role from its blueprint

Workspace and organization settings

ToolLevelWhat it does
getWorkspaceSettingsLäsGets every setting of the workspace
updateWorkspaceAiSettingsAdministreraChanges the workspace's AI settings destructive
updateWorkspaceDocumentSettingsAdministreraChanges the workspace's defaults and policies for new documents destructive
updateWorkspaceRetentionSettingsAdministreraChanges how long the workspace keeps documents destructive
updateWorkspaceSearchSettingsAdministreraChanges the workspace's search settings
findMessageTemplatesLäsLists the workspace's saved invitation messages
createMessageTemplateAdministreraCreates a saved invitation message
updateMessageTemplateAdministreraChanges a saved invitation message
deleteMessageTemplateAdministreraDeletes a saved invitation message destructive
findDocumentCategoriesLäsLists the workspace's document types
createDocumentCategoryAdministreraCreates a document type
updateDocumentCategoryAdministreraRenames a document type or changes its custom fields
deleteDocumentCategoryAdministreraDeletes a document type destructive
findEmailTemplatesLäsLists the emails sajn sends whose text the workspace can customize
getEmailTemplateLäsGets one email's text in one language
updateEmailTemplateAdministreraCustomizes one email's text in one language
restoreDefaultEmailTemplateAdministreraRestores one email's default text in one language destructive
findPlaybookRulesLäsLists the playbook rules that steer how AI reads and reviews documents
createPlaybookRuleAdministreraAdds a rule to the playbook
updatePlaybookRuleAdministreraRewrites a playbook rule
deletePlaybookRuleAdministreraDeletes a playbook rule destructive
getOrganizationLäsGets the organization's details and organization-wide settings
updateOrganizationAdministreraChanges the organization's business details
updateDelegationSettingsAdministreraChanges whether signing parties may delegate their signing
updateUsageAlertSettingsAdministreraChanges when members are alerted about usage
getSecuritySettingsLäsGets the organization's two-factor and sign-in country rules
findWorkspacesLäsLists the workspaces you are a member of
createWorkspaceAdministreraCreates a workspace
updateWorkspaceAdministreraRenames a workspace or changes its color or icon
findAuditLogEventsLäsSearches the organization's audit log
getInboxSettingsLäsGets the workspace's inbox addresses and allowed senders
updateInboxSettingsAdministreraSets which senders may create documents by email
getUsageLäsGets the organization's usage in the current billing period

Your account

ToolLevelWhat it does
getMyProfileLäsGets your profile
updateMyProfileSkrivChanges your name or phone number
getMyNotificationSettingsLäsGets your notification settings
updateMyNotificationSettingsSkrivChanges your notification settings

Developer tools

ToolLevelWhat it does
findApiLogsLäsFinds v1 REST API request logs
getApiLogLäsGets one REST API request log
findWebhooksLäsFinds the webhook endpoints
getWebhookLäsGets one webhook endpoint
createWebhookSkrivCreates a webhook endpoint destructive
updateWebhookSkrivChanges a webhook endpoint destructive
deleteWebhookSkrivDeletes a webhook endpoint destructive
findWebhookDeliveriesLäsFinds outbound webhook deliveries
getWebhookDeliveryLäsGets one webhook delivery with its request and response

Connection and support

ToolLevelWhat it does
getCurrentUserLäsGets the connected user, the organization and the connected workspaces
createUploadUrlSkrivCreates a single-use URL to upload a file to
findToolsLäsSearches the tools that are not listed and returns their input schemas
runReadOnlyToolLäsRuns a read-only tool that findTools returned
runToolLevel of the tool it runsRuns a tool that changes data, which findTools returned
createSupportTicketSkrivSends a support ticket to the sajn team, with the conversation attached destructive
reportMissingCapabilityLäsTells sajn about something the assistant needed but couldn't do

Uploading a PDF

A tool call carries JSON, not file bytes, so the file itself never goes through the MCP connection. How it reaches sajn depends on whether the assistant can run shell commands or raw HTTP requests.

Assistants that can run commands (Claude Code, agents with a shell tool) upload on their own:

  1. createDocument creates the draft.
  2. createUploadUrl returns a single-use upload URL and an uploadKey.
  3. The assistant sends the file to that URL in a PUT request.
  4. addDocumentFile adds the file to the document. Word, Excel, and other Office files are converted to PDF at this step.

Other assistants hand the upload back to you:

  1. The assistant calls createDocument and gives you the link it returns.
  2. You open the link and drag the PDF onto the document.
  3. You tell the assistant it's uploaded, and it continues — getFields to see the PDF, getFieldValues to see what can be filled in, then parties and sending as usual.

The link is an ordinary document URL, not a token — opening it requires your own sajn login. An assistant that asks you to paste a document's contents into the chat is getting it wrong.

Files can be PDF, Word, Excel, PowerPoint, CSV, or plain text, up to 25 MB.

Importing signed agreements into the archive

To add agreements that were signed outside sajn, ask the assistant to import them into the archive. It creates one document per file with type set to ARCHIVE_IMPORTED, titled after the file name, and attaches the file through either of the preceding routes.

Setup

  1. Open the sajn app in the ChatGPT app directory.
  2. Connect the app.
  3. Sign in to sajn, pick the workspaces and a level for each, and select Godkänn.

The ChatGPT app covers the everyday signing workflow: drafting, filling in, parties, sending, and follow-up. It has no developer tools, and it doesn't accept personal identity numbers. Add those to the party in sajn.

Example prompts

Working on documents

  • "Draft an NDA from our standard template, add Anna at Ribban as signer with BankID, and show it to me before sending."
  • "What's still missing on the Volvo agreement before I can send it?"
  • "Fill in the amount as 45 000 SEK and the start date as 1 September, then send it."
  • "Add a price table with 10 hours of consulting at 1 200 SEK, 25% VAT."

Following up

  • "Which documents are waiting for signatures, and who's holding them up?"
  • "Remind everyone who hasn't signed the Q3 contracts."
  • "What expires in the next 30 days?"
  • "Push the deadline on the Ribban agreement out by two weeks."

Debugging an integration

  • "List the failed webhook deliveries from the last day and show me the response body of the first one."
  • "Find the API requests that returned 4xx today and tell me what's wrong with them."
  • "Which webhook endpoint is failing, and what status code is it returning?"

Security

  • Workspace-scoped — a connection only reaches the workspaces you picked at consent, all in one organization.
  • Least privilege — each call is checked against the level you granted for the workspace it acts in, and developer tools also need a workspace permission.
  • Same enforcement as REST — scopes and role permissions are re-checked on every tool call, not just at listing time.
  • Confirmation hints — tools that email or SMS a counterparty, or destroy work, are marked destructive so your client can prompt first.
  • Rate limited — per-IP and per-organization limits apply, the same as the REST API.

Troubleshooting

Tool names changed — my scripts broke

The tools now share their names with the assistant built into sajn. The most common renames:

Old nameCurrent tool
whoamigetCurrentUser
listDocuments, findDocumentsByDate, findDocumentsByExpiration, findDocumentsByCustomField, findDocumentsByParty, searchDocumentContent, getPendingSignaturesfindDocuments, with its filters
getDocumentDetailsgetDocument
getDocumentParties, getDocumentSignersgetParties
addSignerToDocument, updateSignerOnDocument, removeSignerFromDocumentaddParty, updateParty, removeParty
getDocumentSettings, updateDocumentSettingsgetSettings, updateSettings
renameDocument, setDocumentExpiration, extendDocumentExpirationupdateSettings
listFieldsgetFields
listFillableFields, fillFieldsgetFieldValues, setFieldValues
checkDocumentReadinessgetDocumentReadiness
addTable, addProductTableaddTableField, addProductTableField
attachFileToDocumentaddDocumentFile
listSigningMethodsgetSigningMethods
sendDocumentRemindersendPartyReminder
getPendingApprovalsfindPendingApprovals
getTemplateDetailsgetTemplate
findContact, getContactDetails, getCompanyDetailsfindContacts, getContact, getCompany
moveDocumentToFolder, addTagToDocumentmoveDocument, addDocumentTag
getDocumentShareLinkcreateDocumentShareLink
list_api_logs, get_api_logfindApiLogs, getApiLog
list_webhook_deliveries, get_webhook_deliveryfindWebhookDeliveries, getWebhookDelivery
list_webhooks, get_webhook, create_webhook, update_webhook, delete_webhookfindWebhooks, getWebhook, createWebhook, updateWebhook, deleteWebhook
list_sajn_ids, get_sajn_idfindIdentityChecks, getIdentityCheck

For anything else, call findTools with what you want to do.

The debugging tools don't show up

The member must hold the matching workspace permission — Manage developer for API logs, Manage webhooks for deliveries. A connection made before the levels existed also needs the audit:read scope. To get it, reconnect the server.

Connection rejected / 401
  • Confirm the URL is https://app.sajn.se/api/mcp (note /api/mcp, not /mcp).
  • Reconnect the server and complete the OAuth consent flow again.
The assistant says the application lacks permission

The call needs a higher level than you granted for that workspace, such as Skriv to create or send. Reconnect the server and pick a higher level for the workspace.

The assistant works in the wrong workspace

Name the workspace in your request, such as "in Juridik". To change which workspace it uses by default, reconnect the server and use Gör till standard on the review step. A workspace created after you connected is not in the connection until you reconnect.

The assistant says it can't edit a sent document

That's correct — parties, fields and content are locked once a document is out for signing. Withdraw it with withdrawDocument to make it a draft again (the parties are notified), or move the expiry date with updateSettings if that's all you need.

Next steps

Choosing an authentication method

The OAuth flow above is for assistant clients — see which credential your own integration needs

Webhooks

Set up and debug webhook endpoints

Was this page helpful?

Last updated on