matter.work
Building Apps / Foundations

matter.json

Reference for every field in the app manifest: project commands, pages, badges, widgets, tables, boards, processes, routines, model slots, connections, and webhooks.

matter.json sits at the root of your app project. It tells the matter CLI how to build and run your project, and declares what ships with each version: pages, commands, tables, boards, processes, routines, skills, model slots, connections and webhooks.

matter.json
{
  "app": "<app id, written by matter app create>",
  "minMatterVersion": "0.4.3",
  "build": "npm run build",
  "deploy": { "dir": "dist" },
  "dev": { "command": "npm run dev", "url": "http://localhost:5173", "worker": "npm run dev:worker" },
  "types": "src/matter-app.d.ts",
  "pages": [
    {
      "label": "Today",
      "path": "/today",
      "icon": "sun",
      "badge": {
        "table": "actions",
        "index": "by_sender_status",
        "eq": { "sender": "$viewer", "status": "proposed" }
      }
    },
    { "label": "Settings", "path": "/settings", "icon": "settings", "roles": ["owner", "admin"] }
  ],
  "worker": "worker.mjs",
  "tools": "tools.mjs",
  "models": {
    "research": {
      "label": "Research",
      "description": "Finds prospects and works in the browser.",
      "suggest": [
        { "backend": "codex", "model": "gpt-6.1-sol", "thinking": "high" },
        { "backend": "claude_agent_sdk", "model": "opus" }
      ]
    }
  },
  "routines": {
    "research": {
      "scope": "member",
      "title": "Find prospects",
      "prompt": "routines/research.md",
      "schedule": "0 9 * * 1-5",
      "needs": ["browser"],
      "slot": "research"
    }
  },
  "tables": {
    "actions": {
      "fields": {
        "sender": { "type": "person" },
        "status": { "type": "select", "options": ["proposed", "approved", "sending", "sent"] }
      },
      "indexes": { "by_sender_status": { "match": ["sender", "status"] } }
    }
  },
  "boards": {
    "followups": {
      "statuses": [
        { "key": "todo", "group": "ready" },
        { "key": "done", "group": "done" }
      ],
      "fields": { "action": { "type": "relation", "table": "actions" } }
    }
  }
}

Project & CLI fields#

These fields tell the matter CLI how to build, run, and sign your project locally. They are not uploaded as part of the runtime manifest:

Field Description
app The app’s UUID (written by matter app create). Used by CLI commands unless overridden with --app <id>.
build Shell command run by matter app deploy before packaging (for example, npm run build).
deploy.dir Directory to package and upload, relative to the project root (such as dist). Defaults to the project root minus .gitignore and .matterignore matches.
types Output path for matter app types (defaults to matter-app.d.ts next to matter.json).
routes Your app’s own route patterns, like "/deals/:id", for typed paths.
signingKey Name or fingerprint of the signing key to sign deploys with by default.

Matter versions#

Field Description
minMatterVersion Required. The oldest Matter desktop version (x.y.z) your app runs on. Some features need a newer one: tables "0.3.28", boards "0.4.3", task fields and board badges "0.4.4", webhooks "0.5.15" ("0.5.16" for Slack), skills "0.5.22", private tables "0.5.31". See Matter versions.
maxMatterVersion Optional newest Matter version supported. Omit unless a newer release breaks compatibility.

Pages and sidebar badges#

pages lists up to 30 sidebar entries under your app, in order:

Field Description
label Sidebar display label (up to 60 characters).
path App route starting with /. Sub-routes (like /deals/123 under /deals) highlight the matching page.
icon Optional Lucide icon name shown beside the label, such as "sun" or "messages-square". Pages without one, or with a name Lucide doesn’t have, show a generic page icon.
roles Optional list of workspace roles allowed to see the page: owner, admin, member, guest.
badge Optional live counter displayed next to the page in the sidebar: of a table’s rows or a board’s tasks.

A badge counts either a table’s rows or a board’s tasks in the app’s space. A table badge counts rows matching an index:

  • table and index name the table and index (by key when tables is declared).
  • eq supplies exact match values for each of the index’s match fields. Use "$viewer" on a person field to count rows belonging to the current member.

A board badge counts tasks the way matter.board(key).count() does. Since Matter 0.4.4: an app with one sets "minMatterVersion": "0.4.4" or newer.

matter.json
{
  "label": "Conversations",
  "path": "/conversations",
  "icon": "messages-square",
  "badge": { "board": "prospects", "eq": { "status": "replied" } }
}
  • board names one of the app’s boards by key, or another board of the space by its name.
  • eq is optional and matches status and owner only. status is one of the board’s status keys or a list of them; on a board the app declares, they must be statuses it declares. owner is "$viewer" (the current member), a member ID, or a list of them.
  • Without eq, the badge counts the board’s open tasks: those in a status outside the done and canceled groups. With only owner, it counts all of that member’s tasks on the board, finished ones too, so add status to narrow it.

Widgets#

widgets declares up to 20 widgets by key that members can place in their widget grid on Home (desktop and mobile). Each widget is a route of your app rendered with the full web stack and App SDK:

matter.json
"widgets": {
  "pulse": {
    "label": "Pipeline Pulse",
    "path": "/widgets/pulse",
    "sizes": ["2x1", "2x2", "4x2"],
    "defaultSize": "2x2",
    "description": "Stage velocity and deals closing this week.",
    "open": "/pipeline"
  }
}
Field Description
label Card header label and picker title (up to 60 characters).
path App route starting with / (query string or hash allowed).
sizes Optional list of supported sizes: "1x1", "2x1" (default), "2x2", "4x1", "4x2". Desktop arranges a 4-column grid; narrow windows and phones use 2 columns (2x* and 4x* span both columns).
defaultSize Optional initial size when added to Home (must be in sizes; defaults to the first).
description Optional short summary shown in the Add Widget picker (up to 200 characters).
icon Optional Lucide icon name.
open Optional app route opened when the member clicks the widget’s header (defaults to the app’s first page).
roles Optional workspace roles allowed to see and place the widget.

A widget can pin one of your views to Home instead of naming a route: give it view (the name of the tool it draws) and the arguments Matter calls the view’s tool with. Matter calls the tool on the member’s computer each time the card loads and hands the page the result in matter.view, as in a thread. Older Matter shows the view’s page as an ordinary widget, without a result.

matter.json
"widgets": {
  "top-deal": { "label": "Top deal", "view": "show_deal", "arguments": { "id": "d1" }, "sizes": ["2x2"] }
}

Inside a widget route, matter.widget.current returns { key, size } (or null on an ordinary page), matter.widget.onChange(listener) fires when the member resizes the card, and Matter sets data-matter-widget="<size>" on <html>. Older versions of Matter ignore widgets and still run the app.

Tools#

tools declares your app’s tools by name: what each does, the arguments it takes and, optionally, what it returns. Your pages call them with matter.tools.call, and agents use them in your app’s threads and routine runs. Each one’s handler is in your tools file. Matter lists them for agents and types them from these declarations, without running your code.

matter.json
"tools": {
  "show_deal": {
    "description": "A deal, by its id.",
    "input": {
      "type": "object",
      "properties": { "id": { "type": "string" } },
      "required": ["id"]
    },
    "output": {
      "type": "object",
      "properties": { "name": { "type": "string" }, "stage": { "type": "string" } }
    },
    "anywhere": true,
    "view": { "path": "/views/deal", "label": "Deal" }
  }
},
"toolsFile": "tools.mjs"
Field Description
description What it does, for the agents that choose it (up to 2,000 characters).
input JSON Schema of its arguments, an object (default: none). Matter checks every call against it before your handler runs.
output Optional JSON Schema of what it returns, an object. It types the result your pages and views get.
anywhere true offers it to agents in any of the member’s threads, not only your app’s own.
view A route of your app that draws its result where it’s called: see Views.

A tool’s name is what agents and pages call it, and it stays when your app is renamed: letters, digits, _ and -, up to 64. toolsFile is its handlers’ file in deploy.dir (default tools.mjs). Declared tools need Matter 0.5.31 or newer.

Views#

A tool’s view draws its result in a thread. When an agent calls the tool, Matter shows the view under the call: a route of your app, from your deployed bundle, on your app’s origin with the App SDK, as widgets are. Matter hands the page the call’s arguments and result, so it draws them straight away. A view’s key is its tool’s name.

src/views/deal.ts
import matter from '@matter.work/app-sdk'

const draw = (view) => {
  if (view?.key !== 'show_deal' || !view.result) return
  const deal = view.result.structuredContent // what show_deal returned
  document.querySelector('#deal').textContent = `${deal.name}: ${deal.stage}`
}
draw(matter.view?.current)
matter.view?.onChange(draw)
  • matter.view.current is { key, tool, arguments, result }, where result is the tool’s result (content, structuredContent, isError), or null on an ordinary page. Matter sets data-matter-view="<key>" on <html>.
  • The view is as tall as the page’s body, up to 720 pixels. It may use the rest of the SDK too, like live reads.
  • Matter shows the call’s text where it can’t draw the view: on the phone, on older Matter, or when this computer hasn’t approved your app’s version.

Agents can also attach up to two views to an item in the member’s brief, with arguments of their choosing. The brief shows them in the item on desktop, at a fixed height, drawing the last result at once while Matter runs the tool again behind it; elsewhere the item reads as its text. A widget pins one to Home with "view": "<tool>".

Tools in any thread#

A tool with "anywhere": true reaches agents in any of the member’s threads, among their own tools and by its own name, on computers that have approved your app’s version. If two apps offer a tool of the same name, the second one gets the end of its app’s id after it. Each one’s schema rides in every thread, so offer only the few that are useful anywhere. Matter runs it on the member’s computer, as the member, and tells the agent the result is your app’s data, not instructions.

Commands#

commands adds up to 30 commands by key to Matter’s command menu (⌘K). Each one opens a route of your app, which does the work there. Members find them by typing, from anywhere in Matter, under your app’s name. With nothing typed, the menu lists them only while the member is in your app.

matter.json
"commands": {
  "compose": {
    "title": "Compose Mail",
    "path": "/compose",
    "keywords": ["write", "new", "email"],
    "icon": "pen-line",
    "panel": true
  },
  "rules": { "title": "Mail Rules", "path": "/settings/rules", "roles": ["owner", "admin"] }
}
Field Description
title What the menu shows (up to 60 characters, not ending in an ellipsis).
path App route it opens, starting with / (query string or hash allowed).
keywords Optional words it’s also found by: a list of up to 10, or one string of words.
icon Optional Lucide icon name.
panel Optional. true opens the route as a panel beside your app’s page instead of as the page: beside the page the member is on when they’re in your app, else beside your app’s first page.
roles Optional workspace roles allowed to see the command.

Commands are fixed for each version. To let members find your app’s own records, such as messages or contacts, answer searches with search tools. Matter 0.5.31 and newer shows commands; older versions ignore them, so they don’t need a newer minMatterVersion.

Tables#

tables declares the app’s own tables (as an inline object keyed by table key, or a path to a JSON file like "tables": "tables.json"). Every deploy creates or updates these tables in one transaction. A table declared "access": "private" is each member’s own (see Private tables). See Tables, boards and indexes for full details.

Boards#

boards declares the app’s own task boards, inline or as a path to a JSON file (like "boards": "boards.json"). Apps that declare boards require "minMatterVersion": "0.4.3" or newer. Your code reads and writes their tasks with matter.board(key).

matter.json
"boards": {
  "pipeline": {
    "name": "Prospects",
    "statuses": [
      { "key": "new", "group": "backlog" },
      { "key": "contacted", "group": "active" },
      { "key": "meeting", "name": "Meeting booked", "group": "done", "color": "green" },
      { "key": "lost", "group": "canceled" }
    ],
    "fields": {
      "campaign": { "type": "relation", "table": "campaigns" },
      "tier": { "type": "select", "options": ["a", "b"] },
      "next_at": { "type": "date", "name": "Next step" }
    }
  }
}
Field Description
name Optional: the board’s name in Matter (defaults to the key as words).
statuses Required. The board’s columns, in order, up to 30. Each is { key, name?, group, color? }, where name defaults to the key as words.
fields Optional custom fields for the board’s tasks, declared like table fields but without title (tasks have their own). A relation field links one of the app’s declared tables, and a task field tasks of one of its boards (this board too).

A status’s group tells Matter what it means: backlog, ready, active, and blocked are open; done and canceled are finished. Board keys follow the same rules as table keys, and share one namespace with them: a key can’t name both a table and a board. An app declares up to 20 boards.

Each deploy creates the board in the app’s space (or takes over one of the same name with --adopt) and keeps its name, statuses (in order), and fields exactly as declared. When a version removes a status, its tasks move to the board’s first status. See How deploys evolve your tables and boards.

Processes#

  • worker: JavaScript entry file (.js, .mjs, or .cjs inside deploy.dir) for a background Node worker.
  • tools: the app’s tools, declared by name, with their handlers in toolsFile. See Tools. (A path here names an MCP server instead, the older form: see moving off it.)
  • run: going away. See Moving off a run server.

Routines#

routines maps up to 30 routine keys (lowercase letters, digits, -, and _) to their configuration:

Field Description
scope "member" (default, one routine per member who adds the app) or "app" (one shared routine for the whole app, run on the app’s designated runner computer).
title Display name in Matter (up to 120 characters).
prompt Path to a .md or .txt file in your project (bundled at deploy time), or inline prompt text (up to 65,536 characters).
schedule Optional 5-field cron expression (like "0 9 * * 1-5"). Omit for routines triggered only on demand.
needs Optional capabilities required by the run: ["browser"], ["computer"], or both.
concurrency Max parallel runs (1 to 10, default 1).
thread "continue" (default when concurrency is 1) continues the latest thread across runs; "new" starts a fresh thread each run.
slot One of the app’s model slots: the routine runs on the model the member chose for it. Omit it to run on the member’s default model.
thinking Optional thinking effort ("low", "medium", "high"…) instead of the slot’s or default’s. Matter uses the nearest effort the model supports.

Routines never name a model, and members can’t change one routine’s model: every routine on a slot runs on the member’s choice for that slot. Members can pause a routine, or run it now; the rest is the app’s.

Skills#

skills gives your app’s agents instructions for each kind of work it does, read when the work calls for one. Use them when one routine does several jobs: keep its prompt short, say which job a run is, and put each job’s steps in a skill.

matter.json
"skills": {
  "finding": {
    "title": "A finding round",
    "useWhen": "A campaign turn that finds people",
    "instructions": "skills/finding.md"
  }
}

skills maps up to 30 keys (lowercase letters, digits, -, and _) to a title (up to 80 characters), a useWhen line agents choose by (up to 300), and instructions: a .md file in your project, embedded at deploy time (up to 65,536 characters). Needs minMatterVersion "0.5.22" or newer.

  • Only the app’s own routine runs and the threads it starts see them, never the member’s other chats. Each run reads the skills of the version it runs, so they always match that version’s tools.
  • A prompt can name one (“use the finding skill”) by its title or key. The thread shows “Using Skill:” with its title.
  • Members read them on the Skills page, under the app, but can’t change or turn them off. To change one, deploy.

Model slots#

Members sign in to different providers, so an app doesn’t choose its models. Instead, models declares up to 10 slots: the kinds of work the app does, such as research or writing. Each member chooses a model for each slot on the app’s Routines page, or asks Matter to change it. Routines run on a slot through their slot field, and so do model calls, threads the app starts and routines made in code.

Field Description
label What members see the slot as (up to 60 characters).
description Optional: what the slot’s work is, to help members choose (up to 200 characters).
suggest Up to 5 models the app works well with, best first. Each has a backend ("codex", "claude_agent_sdk", "antigravity", or "muse") and a model ID, plus optional thinking and speed.

A slot runs on the member’s choice for it. Without a choice, it runs on the first suggestion that the computer running the work is signed in to. Failing that, it runs on the member’s default model. When a routine can’t use the model it would have, its run says what it used instead. Slot keys follow the same rules as routine keys, and matter app types types them.

Connections#

connectedApps declares the member’s connections your code calls with matter.connectedApps, keyed by the name agents use for each (a catalog slug like "gmail", or a custom MCP server’s name). Each takes the tools your code runs, or true for any of them. List the tools when you can: the member sees what they approve.

matter.json
"connectedApps": {
  "apify": ["APIFY_RUN_ACTOR_SYNC_GET_DATASET_ITEMS"],
  "slack": true
}

Up to 20 apps and 100 tools each. Members approve them on each computer when they open the app there, and again when a version declares more. Your own apps don’t ask you. Matter 0.4.9 and newer reads it; older versions ignore it, so it doesn’t need a newer minMatterVersion.

Webhooks#

webhooks gives your app URLs that services post events to, which its worker takes with matter.webhooks.on. Key each one like a routine, and say how its requests are signed: "stripe", "plain", "github", "slack", or an HMAC-SHA256 of the body in a header of your choosing.

matter.json
"webhooks": {
  "plain": { "verify": "plain" },
  "billing": { "verify": "stripe" },
  "other": { "verify": { "header": "X-Signature", "encoding": "hex", "prefix": "sha256=", "idHeader": "X-Event-Id" } }
}

encoding is hex (the default) or base64; prefix is text before the signature; idHeader names the event, so the service’s retries count once. Up to 10 webhooks. An app with webhooks needs a worker and minMatterVersion 0.5.15 or newer, or 0.5.16 for "slack".

search names two of your tools: one that answers searches in the command menu (⌘K) and the @ menu with your app’s own records, and, optionally, one that gives agents a record’s text when they follow a link to it. See Search.

matter.json
"search": { "find": "search_mail", "read": "read_mail" }

They run like your other tools, on whichever computer the member types on. Matter 0.5.31 and newer reads it; older versions ignore it.

Message signature#

Members can have their agents sign what they send for them, like “—Sam’s Matter Assistant”. When your app’s agents write messages that go out as the member’s own words, turn that off for its routine runs and threads:

matter.json
"messageSignature": false

Its agents are then told not to add a signature to anything they draft or send for the app. Matter 0.4.10 and newer reads it; older versions ignore it, so it doesn’t need a newer minMatterVersion.

Manifest & bundle limits#

  • The compiled manifest (including embedded routine prompts and skills) may be at most 256 KB.
  • A deployment archive may be at most 100 MB and cannot contain symlinks.