---
title: "What the brand gets"
url: https://services.dev/docs/examples/legal/surfaces
captured: [legal-fill.txt, legal-surfaces.txt, mcp-legal.txt]
---
# What the brand gets

URL: https://services.dev/docs/examples/legal/surfaces

> The legal brand's API, CLI, MCP server, SDK, Site, Docs and App, each generated from its files, in its own words of matter, review and signer.

*legal's words: matter is a job, asset is a subject, review is a task, signer is a member, network is a pool, outcome is a end (examples/legal/brand.ts).*

Six files of Services, and the brand gets seven surfaces. Each one below is what the brand serves for this folder. `brand.ts` sets the words, so a client, an agent or an attorney reads matter, review and signer everywhere, and never the words services.dev uses inside.

## API

Every route its `openapi.json` lists:

```txt
→ GET /openapi.json
```

```txt title="magic values: none"
  servers https://api.lawyer (legal's own origin) · http://localhost:8787 (Where dev serves it now)
  POST GET    /matters
  POST        /contract-review
  POST        /demand-letter
  POST        /docket-watch
  POST        /formation
  POST        /provisional-patent
  POST        /trademark-response
  GET         /contract-review.json
  GET         /demand-letter.json
  GET         /docket-watch.json
  GET         /formation.json
  GET         /provisional-patent.json
  GET         /trademark-response.json
  POST        /contract-review/waitlist
  POST        /demand-letter/waitlist
  POST        /docket-watch/waitlist
  POST        /formation/waitlist
  POST        /provisional-patent/waitlist
  POST        /trademark-response/waitlist
  GET         /catalog
  GET         /catalog/{id}
  GET         /matters/{id}
  POST        /matters/{id}/accept
  POST        /matters/{id}/send_back
  POST        /matters/{id}/cancel
  POST        /matters/{id}/end
  POST        /matters/{id}/again
  POST        /matters/{id}/policy
  POST        /matters/{id}/signals
  POST GET    /matters/{id}/messages
  GET         /matters/{id}/record
  POST        /{portal}/matters/{id}/approve
  POST        /{portal}/join
  POST        /{portal}/signers/{id}/verify
  POST        /me/availability
  GET POST    /me/ledger
  GET         /me/ledger/checks
  GET         /me/missed
  GET         /reviews
  GET         /reviews/{id}
  GET         /reviews/{id}/sheet
  POST        /reviews/{id}/pass
  POST        /reviews/{id}/claim
  POST        /reviews/{id}/clear
  GET         /reviews/{id}/packet
  POST        /reviews/{id}/release
  POST        /owner/reviews/{id}/offer
  POST        /reviews/{id}/attest
  POST        /reviews/{id}/send_back
  POST        /reviews/{id}/decline
  POST        /reviews/{id}/recuse
  POST        /reviews/{id}/extend
  POST        /reviews/{id}/contest
  POST        /reviews/{id}/messages
  GET         /assets
  GET         /assets/{id}
  GET         /me/assets
  POST        /assets/{id}/withdraw
  GET         /clocks
  GET         /clocks/{id}
  POST        /clocks/{id}/ack
  POST        /clocks/{id}/satisfy
  POST        /clocks/{id}/choose
  POST        /owner/clocks/{id}/assign
  GET         /subscriptions
  GET         /subscriptions/{id}
  POST        /subscriptions/{id}/cancel
  POST        /owner/signers/{id}/login
  GET POST    /asks/{id}
  POST        /asks/{id}/revoke
  POST        /asks/{id}/reissue
  GET         /matters/{id}/files
  PUT GET     /matters/{id}/files/{sha256}
  GET         /matters/{id}/export
  GET         /owner/matters/{id}
  POST        /keys
  POST        /keys/{key}
  POST        /test_clocks
  POST        /test_clocks/{id}/advance
  GET POST    /events
  GET         /events/stream
  POST GET    /watches
  DELETE      /watches/{id}
  POST        /watches/{id}/replay
  GET         /index.json
  GET         /healthz
  GET         /fixtures
  GET         /.well-known/agents.json
  GET         /openapi.json
  GET         /llms.txt
  GET         /manifest.json
  GET         /pricing
  GET         /verify/suite.json
```

## CLI

The help, run in the brand's folder:

```bash
npx services.dev help
```

```txt title="magic values: none"
  dev [--port 8787] [--members N --market tight|normal|flush]  serve every Service on localhost; an agent orders a first matter
  matters export <matter>           one matter's evidence bundle
  matters ledger <matter>           one matter, as the owner reads it
  <service> k=v …                   order a matter: --max <usd>, --key <key>, --approved, --policy k=v, --metadata k=v, --test-clock <tc_>
  matters get <matter>              read a matter
  matters wait <matter>             wait up to 50 seconds for a matter to finish
  matters list                      the buyer's matters, newest first
  matters accept <matter>           accept a delivered matter
  matters send-back <matter> <note> send a matter back with a note, and the AI redoes it
  matters cancel <matter>           cancel a matter before delivery
  matters end <matter> <outcome>    end a matter at one of its outcomes, as that outcome's by allows
  matters again <matter>            order an ended matter again
  matters set-policy <matter> k=v … set a matter's policy values within their bounds
  matters signal <matter> <signal>  raise one of the Service's inbound signals
  matters message <matter> <text>   say something in the matter's thread as the client
  matters messages <matter>         read the matter's messages, oldest first
  matters record <matter>           a matter's record as you may read it, oldest first
  assets list                       the assets your matters joined
  clocks list                       the clocks your matters and their assets run
  matters files list <matter>       the files a matter holds, each by its sha256
  matters files put <matter> <path> put a file in a matter's documents plane under its own sha256
  matters files get <matter> <sha256>  read a file a matter holds, by its sha256
  matters approve <matter>          approve, sign or do a matter waiting on a person
  reviews message <review> <kind> <text>  reach the client through the matter's thread, by kind
  order <service> k=v …             order a matter: --max <usd>, --key <key>, --approved, --policy k=v, --metadata k=v
  get <matter>                      matters get
  wait <matter>                     matters wait, until it stops working
  accept <matter>                   matters accept
  send-back <matter> <note>         matters send-back
  cancel <matter>                   matters cancel
  approve <matter>                  matters approve
  --no-try       dev skips the first matter
  --affirm <item>       matters approve and reviews attest: each checklist item the person affirms
```

## MCP and SDK

The buyer toolset an agent lists, then the typed client `services.dev sdk` writes:

```txt
→ tools/list
```

```txt title="magic values: none"
  order_matter              Order any of legal's 6 Services: name it in service, with its own fields.
  get_matter                Read a matter, now or after waiting up to wait seconds while it works or waits on a person.
  list_matters              The buyer's matters, newest first: OK, or EMPTY when none match.
  accept_matter             Accept a delivered matter.
  send_back_matter          Send a matter back with a note, and the AI redoes it: a delivered one as the buyer, a waiting one as the person at the line.
  cancel_matter             Cancel a matter before delivery.
  end_matter                End a matter at one of its outcomes, as that outcome's by allows.
  reorder_matter            Order an ended matter again, or a follow-on Service its outcome offers: a new matter, with from on its record.
  set_matter_policy         Set a matter's policy values within their bounds: mechanics from the buyer or the brand's console, merits from the client alone.
  send_matter_signal        Raise one of the Service's inbound signals.
  send_matter_message       Say something in the matter's thread as the client.
  list_matter_messages      Read the matter's messages, oldest first: one resource with the posts.
  reissue_ask               Reissue an open ask's link, to hand to its party again.

# SDK: the generated client's namespaces and their methods, the table services.dev sdk writes
  contractReview      order
  demandLetter        order
  docketWatch         order
  formation           order
  provisionalPatent   order
  trademarkResponse   order
  matters             get · wait · list · accept · sendBack · cancel · end · again · setPolicy · signal · message · messages · record · files.list · files.put · files.get
  clocks              list · get · ack · satisfy · choose
  subscriptions       list · get · cancel
  asks                reissue
  testClocks          create · advance
  events              list · stream · send
  watches             create · list · delete · replay
```

An agent orders and reads matters, and never signs, files or consents for anyone:

```txt
→ initialize
```

```txt title="magic values: none"
  order_matter takes service, the input, max_usd and a key.
  Without max_usd you get an OFFER: send its next call unchanged to order.
  The same key returns the same matter.
  Services charge on file's receipt, except contract-review (on acceptance), demand-letter (on send's receipt), docket-watch (monthly) and formation (on form_entity's receipt).
  Canceling before then costs $0.
  get_matter with wait: 50 waits through any person's line; then accept_matter, or send_back_matter with a note.
  contract-review, demand-letter, formation, provisional-patent and trademark-response wait on a party: next hand_to_person is a link only that person can use; no tool acts for them.
  This is test mode: a sk_test_ key, simulated AI and money; metadata.sandbox picks branches.
```

## Site

The head of one Service's page, as a browser gets it:

```txt
→ GET /contract-review   # accept: text/html
```

```txt title="magic values: none"
  Contract Review
  A contract flagged, then advised on.
  $99 per matter, within 48 hours, charged on acceptance. · An attorney signs at advise, stamped. The client consents first.
```

## Docs

The brand's own `llms.txt`: each Service with its price and who signs, then every operation:

```txt
→ GET /llms.txt
```

```txt title="magic values: none"
# legal

> legal sells Contract Review, Demand Letter, Docket Watch, Company Formation, Provisional Patent Application and Trademark Office Action Response. Order over MCP at http://localhost:8787/mcp or HTTP; every price is at http://localhost:8787/pricing.

## Contract Review

A contract flagged, then advised on. $99 per matter, within 48 hours, charged on acceptance. An attorney signs at advise, stamped. The client consents first.

MCP: order_contract_review at http://localhost:8787/mcp

```
curl http://localhost:8787/matters -H 'content-type: application/json' -d '{"service":"contract-review","contract":{"url":"https://example.com/contract.pdf","name":"contract.pdf"},"client_region":"US-CA","max_usd":99,"key":"any-string-you-choose"}'
```

…
## Operations

Every call, by its id: its route, then its MCP tool. A list answers OK or EMPTY in its type, a price OFFER and a no BLOCKED, and every no is one shape. Every route is in http://localhost:8787/openapi.json.

- `service.order` POST /matters · order_matter · Order a matter, or get the offer: the price and the exact next call.
- `job.get` GET /matters/:id · get_matter · Read a matter, now or after waiting up to wait seconds while it works or waits on a person.
- `job.wait` GET /matters/:id?wait=<seconds> · matter:// · Wait up to 50 seconds for a matter to finish, through any person's line.
- `job.list` GET /matters · list_matters · The buyer's matters, newest first: OK, or EMPTY when none match.
```

## App

One brand serves three apps, each at its own path: the customer portal, the attorneys' delivery portal and the owner console. The dev server prints them, with the verifier's token:

```bash
npx services.dev dev --members 12 --market tight --no-try
```

```txt title="magic values: client.email = signs@example.test"
  buyers              http://localhost:8787/portal
  attorneys           http://localhost:8787/attorneys · join at /attorneys/join, or npx services.dev signers add attorneys <email>
  verifier            vt_test_7Hq2 · the only writer of verified facts, at POST /<network>/signers/:id/verify
  you                 http://localhost:8787/console
```

[The customer portal](https://services.dev/docs/examples/legal/customer-portal.md) and [the delivery portal](https://services.dev/docs/examples/legal/delivery-portal.md) show their screens. [Brand()](https://services.dev/docs/service/brand.md) covers the words.

---

- Up: [The legal example](https://services.dev/docs/examples/legal.md)
- Previous: [The money](https://services.dev/docs/examples/legal/money.md)
- Next: [The rules table](https://services.dev/docs/examples/legal/rules.md)
