Skip to content

MCP tools

View as Markdown

The server is at https://app.ligament.ai/api/mcp. A key sees only the tools its scopes allow. Setup and examples: MCP server.

Record tools

records_query

Scope: records:read:<entity>

List records of an entity: filters ([{field, op, value|values}], ops eq ne contains empty not_empty in lt lte gt gte), match all|any, sort ("-salary,name"), q (search), limit (≤ 200), offset. With asOf, effective-dated fields are as of that date and each row has _effective (versions shown, which fields are current).

ArgumentTypeDescription
entity requiredstringEntity key, e.g. person
filtersobject[]
match"all" | "any"
sortstring
qstring
limitnumber
offsetnumber
asOfstringEffective dating: a date YYYY-MM-DD (00:00 in the workspace time zone) or @today, @end_of_last_month, @end_of_last_quarter, @end_of_last_year. Dated fields show their value on that date; other fields show today's; access is decided now. Records not started on that date are absent.
knownAtstringAs recorded at this instant (bitemporal: before later corrections). Needs records.as_recorded or an audit:read key.

records_get

Scope: records:read:<entity>

One record by id. With asOf: as of that date (404 effective_not_started when it didn't exist yet), with _effective.

ArgumentTypeDescription
entity requiredstringEntity key, e.g. person
id requiredstring
asOfstringEffective dating: a date YYYY-MM-DD (00:00 in the workspace time zone) or @today, @end_of_last_month, @end_of_last_quarter, @end_of_last_year. Dated fields show their value on that date; other fields show today's; access is decided now. Records not started on that date are absent.
knownAtstringAs recorded at this instant (bitemporal: before later corrections). Needs records.as_recorded or an audit:read key.

records_history

Scope: records:read:<entity>

An effective-dated record's history: versions per group (e.g. comp, job), newest first, with from/to, kind, reason, who, when recorded, status (scheduled, in_force, past, superseded). include ["corrections"] adds superseded versions (records.as_recorded).

ArgumentTypeDescription
entity requiredstringEntity key, e.g. person
id requiredstring
groupstring
include"corrections" | "proposed"[]
knownAtstringAs recorded at this instant (bitemporal: before later corrections). Needs records.as_recorded or an audit:read key.

records_changes

Scope: records:read:<entity>

The changes feed for exports (payroll-style): changes RECORDED since recordedSince (an instant: your last watermark), new, corrected or rescinded, with the periods whose values changed and the values after (and before, for records.as_recorded). Filter by group, effectiveFrom/effectiveTo, overlapsBefore (periods you already exported). Pass nextCursor to page; keep watermark.

ArgumentTypeDescription
entity requiredstringEntity key, e.g. person
recordedSince requiredstring
recordedUntilstring
groupstring[]
effectiveFromstring
effectiveTostring
overlapsBeforestring
cursorstring
limitnumber

records_change

Scope: records:write:<entity>

Change a record. On an effective-dated entity pass effective: { from: "2027-03-01", reason: "merit", mode: "change" | "correction" | "rescind", version?, group? }: a change from a date (future = scheduled), a correction of the version in force on from (or with version + from, re-timing it), or a rescind of a version. Without effective, dated values change from today. Returns the record (today's values) and effective (versions written, warnings about later changes it rewrote).

ArgumentTypeDescription
entity requiredstringEntity key, e.g. person
id requiredstring
valuesobject
effectiveobject

Access tools

access_whoami

Scope: records:read

Who this key acts as here: user id, role (capped at the key creator's role), key scopes, and how access is decided (evaluator: v2 = roles, permission sets and restrictions decide; shadow = the previous access rules decide while the current ones are compared).

access_explain

Scope: records:read

Why a principal may or may not do an action on an entity or one record: allow, reason (granted, no_grant, forbidden, row_mismatch, field_level, app_access, key_scope), the fix, the row predicate in words, field levels, and the trace of rules that decided it. A record outside the scope is never described.

ArgumentTypeDescription
entity requiredstringEntity key, e.g. incident
action"read" | "create" | "update" | "delete" | "transition"default read
recordIdstring
fieldsstring[]
principalstring | objectWhom to explain: "self" (default), {"user": "<userId>"} or {"role": "<roleKey>"}. Others need an admin key.

access_effective

Scope: records:read

What a principal can do: per entity, each action (read, create, update, delete, transition) allowed or not with the reason and the rows in words, plus every field's level (hidden, read, write). Omit entity for all entities.

ArgumentTypeDescription
entitystringEntity key, e.g. incident
principalstring | objectWhom to explain: "self" (default), {"user": "<userId>"} or {"role": "<roleKey>"}. Others need an admin key.

access_plan

Scope: spec:read

Dry-run changes to access artefacts (role/<key>, permissionSet/<key>, restriction/<key>, groupMapping/<groupId>, hierarchy/<key>, share/<key>) without writing: the spec plan (per item action, changes, errors, permission, whether a person must apply it) plus accessDiff, the effective-access diff: per affected role and member, per entity, action and field, what is gained, lost or changed, in words, with live row counts before → after. Apply with spec_apply or a changeset. The key's creator needs the Build capability, or must be an app admin planning their own app's permission sets, roles and restrictions.

ArgumentTypeDescription
items requiredobject[]

Spec tools

spec_catalog

Scope: spec:read

The catalog for writing valid spec docs: artefact types (with the build permission each needs), entities with their fields, roles, approved components and the page block registry.

spec_list

Scope: spec:read

List the artefacts in the spec store (effective layer): address, type, key, app, layer, hash, customised, conflict count.

ArgumentTypeDescription
type"page" | "acl" | "role" | "permissionSet" | "restriction" | "groupMapping" | "hierarchy" | "share"
appstringApp key, or __tenant__ for workspace-owned artefacts

spec_get

Scope: spec:read

Read one artefact: { address, layer, doc, hash, version, customised, base, conflicts }. doc is exactly what spec_apply takes: applying it with baseHash = hash is a noop.

ArgumentTypeDescription
address requiredstringArtefact address: <app>/<type>/<key> (as spec_list / spec_get return it) or <type>/<key>. Types: page, acl, role, permissionSet, restriction, groupMapping, hierarchy, share
layer"effective" | "base" | "custom" | "source"default effective
versionintegera past version (spec_history)

spec_schema

Scope: spec:read

The JSON Schema of one artefact type (also served as resource ligament://spec/schema/<type>).

ArgumentTypeDescription
type required"page" | "acl" | "role" | "permissionSet" | "restriction" | "groupMapping" | "hierarchy" | "share"

spec_validate

Scope: spec:read

Validate docs against the workspace (no state, no permissions): { ok, errors[], warnings[] } with { address, code, path, message, fix }.

ArgumentTypeDescription
items requiredobject[]

spec_plan

Scope: spec:read

Plan changes without writing: per item the action, the layer it writes, per-path changes, the merge with changes made since baseHash (none / clean / conflict with base, yours, current), the permission it needs and whether you hold it, and whether a person must apply it.

ArgumentTypeDescription
items requiredobject[]

spec_history

Scope: spec:read

Version history of one artefact, newest first: version, action, layer, hash, changes, changeset, who and when.

ArgumentTypeDescription
address requiredstringArtefact address: <app>/<type>/<key> (as spec_list / spec_get return it) or <type>/<key>. Types: page, acl, role, permissionSet, restriction, groupMapping, hierarchy, share

spec_apply

Scope: spec:apply

Apply changes all-or-nothing. Every item needs baseHash (null = new). Returns { versions } (empty = noop). Errors: spec.conflict (conflicts: base/yours/current), spec.merge_available (merged docs to re-apply), spec.changed, spec.invalid, spec.permission. When the workspace requires a person to apply it (access/code changes made with a key), nothing is applied and the result says proposed: true with the changeset waiting for review.

ArgumentTypeDescription
items requiredobject[]
onConflict"reject" | "merge"reject (default): a clean merge with changes made since comes back as a spec.merge_available error holding the merged doc; merge: apply clean merges directly. Real conflicts are always refused.
titlestringChangeset title used if the change has to wait for a person

Changeset tools

changeset_list

Scope: spec:read

Changesets, newest first: id, title, status, item count, addresses, who proposed it.

ArgumentTypeDescription
status"open" | "ready" | "applied" | "discarded"[]

changeset_get

Scope: spec:read

One changeset with its items (address, baseHash, doc | delete) and activity.

ArgumentTypeDescription
id requiredstringChangeset id (changeset_list / changeset_create)

changeset_create

Scope: spec:propose

Propose a change for a person to review (never applies anything). Items are optional; an item without baseHash starts from the current doc. ready: true marks it ready for review.

ArgumentTypeDescription
title requiredstring
notestring
itemsobject[]
readyboolean

changeset_put_items

Scope: spec:propose

Add or replace items of an open changeset (one per artefact).

ArgumentTypeDescription
id requiredstringChangeset id (changeset_list / changeset_create)
items requiredobject[]

changeset_plan

Scope: spec:read

The plan of every item of a changeset against current (same shape as spec_plan).

ArgumentTypeDescription
id requiredstringChangeset id (changeset_list / changeset_create)

changeset_apply

Scope: spec:apply

Apply every item of a changeset all-or-nothing (same errors as spec_apply). When the workspace requires a person to apply it, nothing is applied and the result says so with the changeset link.

ArgumentTypeDescription
id requiredstringChangeset id (changeset_list / changeset_create)
onConflict"reject" | "merge"reject (default): a clean merge with changes made since comes back as a spec.merge_available error holding the merged doc; merge: apply clean merges directly. Real conflicts are always refused.

changeset_discard

Scope: spec:propose

Discard a changeset (kept, with its activity, as discarded).

ArgumentTypeDescription
id requiredstringChangeset id (changeset_list / changeset_create)

Invite tools

invites_list

Scope: members:write

List this workspace's invites: email invites and domain/open links that are pending (expired ones included), with state (pending, expired, used_up, accepted, revoked), expiresAt and expiresInDays. history: true adds the invites accepted or revoked in the last 30 days. Admins only.

ArgumentTypeDescription
historybooleanalso list invites accepted or revoked in the last 30 days

invites_resend

Scope: members:write

Resend an email invite that is pending or expired: issues a new link (the old link stops working), restarts the expiry (the workspace's invite expiry, default 14 days) and emails the invite again. Returns the invite, the new link and whether the email was sent. Links (domain/open) can't be resent: create a new one. Admins only.

ArgumentTypeDescription
id requiredstringinvite id (invites_list)

Exchange-rate tools

fx_convert

Scope: records:read

Convert a money amount to another currency with the exchange rate in force on a date (the direct pair, else the inverse pair). Send the amount as a decimal string, e.g. { amount: { amount: "1250.00", currency: "USD" }, to: "EUR", asOf: "2026-01-31" }. Returns { amount, currency, from, rate, rateDate (the date the rate took effect), source, inverse? }, the amount rounded half-even to the currency's minor units. Error code fx_rate_missing when no rate exists for the pair on that date.

ArgumentTypeDescription
amount requiredobject
to requiredstringtarget ISO 4217 code
asOfstringThe date whose rate applies: YYYY-MM-DD (in the workspace time zone) or @today, @end_of_last_month, @end_of_last_quarter, @end_of_last_year. Default: today.

fx_rates

Scope: records:read

The exchange rates in force on a date (default today): [{ base, quote, rate, rateDate, source }], 1 base = rate quote. rateDate is the date each rate took effect.

ArgumentTypeDescription
asOfstringThe date whose rate applies: YYYY-MM-DD (in the workspace time zone) or @today, @end_of_last_month, @end_of_last_quarter, @end_of_last_year. Default: today.

E-signature tools

esign_status

Scope: esign:read

An envelope: status, recipients (who signed when), documents, the seal (certificate id, key id, timestamp).

ArgumentTypeDescription
envelopeId requiredstring

esign_sealed_pdf

Scope: esign:read

Where to download the sealed PDF of a completed envelope (GET with the same key), its sha256 and its Verify page.

ArgumentTypeDescription
envelopeId requiredstring

esign_create_envelope

Scope: esign:write

Create an e-signature envelope on a record and send it (send: false keeps a draft). Documents are PDFs attached to that record (attachmentId) or a template key. People sign themselves: members in the app, others through an emailed link + one-time code. Returns the envelope.

ArgumentTypeDescription
subject requiredobject
titlestring
messagestring
templatestring
documentsobject[]
recipients requiredobject[]
fieldsobject[]{ recipient (index or email), document?, kind, page, x, y, w, h, required?, label? } in PDF points.
signingOrder"parallel" | "sequential"
expiresInDaysinteger
reminderEveryDaysinteger
sendboolean
idempotencyKeystring

esign_send

Scope: esign:write

Send a draft envelope (invites the first signers).

ArgumentTypeDescription
envelopeId requiredstring

esign_void

Scope: esign:write

Void (withdraw) an envelope that is not finished. The reason is shown to the signers.

ArgumentTypeDescription
envelopeId requiredstring
reason requiredstring

esign_remind

Scope: esign:write

Remind the signers whose turn it is (or one recipient) with a fresh link.

ArgumentTypeDescription
envelopeId requiredstring
recipientIdstring

App Store tools

store_updates

Scope: apps:read

Installed apps with a newer version available in this workspace: key, name, from, to, bump (patch/minor/major).

store_install_plan

Scope: apps:read

What installing an app does here, in order (deepest dependency first, the app last), with versions and plan prices, the dependencies already installed and the paid ones that need explicit acceptance. Changes nothing.

ArgumentTypeDescription
appKey requiredstring
planKeystring
versionstring

store_install_status

Scope: apps:read

One install run: each step (app, version, plan, status, error), what is installed and the failed step.

ArgumentTypeDescription
runId requiredstring

store_install

Scope: apps:install

Install an app. dependencies: "fail" (default) refuses when other apps must be installed first and returns the plan; "install" installs them first, in order, one at a time. A dependency with no free plan needs acceptPaid: ["<key>"] (nothing is bought otherwise). A failure stops the run: resume it with store_install_resume.

ArgumentTypeDescription
appKey requiredstring
planKeystring
versionstring
dependencies"install" | "fail"
acceptPaidstring[]

store_install_resume

Scope: apps:install

Retry a failed install run from the step that failed; what is installed stays and is not redone.

ArgumentTypeDescription
runId requiredstring

store_upgrade

Scope: apps:install

Upgrade installed apps, dependencies first. appKeys (or all: true). dryRun: true previews each app's changes (entities/fields added, removed, changed) and what would be blocked. A destructive change blocks that app unless its key is in confirm. Access-widening changes are held.

ArgumentTypeDescription
appKeysstring[]
allboolean
dryRunboolean
confirmstring[]

store_uninstall

Scope: apps:install

Uninstall an app (its records stay). Refused while other installed apps depend on it: the error names them. preview: true returns who loses which access, changing nothing.

ArgumentTypeDescription
appKey requiredstring
previewboolean

store_auto_patch

Scope: settings:write

The owner setting "auto-apply patch updates" (default off): on applies x.y.Z updates that are not destructive and widen no access, once a day. Omit `on` to read it. Changing it needs the workspace owner's key.

ArgumentTypeDescription
onboolean

Your workspace's own tools

Tool nameScopeDescription
connector__<connector>__<operation>endpoints:invokeOne tool per operation of each connector the workspace has marked as exposed. Inputs are the operation's template variables.
script__<script>endpoints:invokeOne tool per script the workspace has marked as exposed. Takes the script's JSON input.

Resources

URIDescription
ligament://spec/catalogArtefact types, entities and fields, roles, components and blocks (same as spec_catalog).
ligament://spec/schema/pageThe JSON Schema of a page doc.
ligament://spec/schema/aclThe JSON Schema of a acl doc.
ligament://spec/schema/roleThe JSON Schema of a role doc.
ligament://spec/schema/permissionSetThe JSON Schema of a permissionSet doc.
ligament://spec/schema/restrictionThe JSON Schema of a restriction doc.
ligament://spec/schema/groupMappingThe JSON Schema of a groupMapping doc.
ligament://spec/schema/hierarchyThe JSON Schema of a hierarchy doc.
ligament://spec/schema/shareThe JSON Schema of a share doc.
ligament://spec/schema/{type}JSON Schema of one artefact type (page, acl, role, permissionSet, restriction, groupMapping, hierarchy, share)