SimpleLegal · Capability

SimpleLegal API — Matters

SimpleLegal API — Matters. 4 operations. Lead operation: List Matters. Self-contained Naftiko capability covering one Simplelegal business surface.

Run with Naftiko SimplelegalMatters

What You Can Do

GET
Listmatters — List Matters
/v1/matters
POST
Creatematter — Create Matter
/v1/matters
GET
Getmatter — Get Matter
/v1/matters/{id}
PATCH
Updatematter — Update Matter
/v1/matters/{id}

MCP Tools

list-matters

List Matters

read-only idempotent
create-matter

Create Matter

get-matter

Get Matter

read-only idempotent
update-matter

Update Matter

idempotent

Capability Spec

simplelegal-matters.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: SimpleLegal API — Matters
  description: 'SimpleLegal API — Matters. 4 operations. Lead operation: List Matters. Self-contained Naftiko capability covering
    one Simplelegal business surface.'
  tags:
  - Simplelegal
  - Matters
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    SIMPLELEGAL_API_KEY: SIMPLELEGAL_API_KEY
capability:
  consumes:
  - type: http
    namespace: simplelegal-matters
    baseUri: https://app.simplelegal.com/api/v1
    description: SimpleLegal API — Matters business capability. Self-contained, no shared references.
    resources:
    - name: matters
      path: /matters
      operations:
      - name: listmatters
        method: GET
        description: List Matters
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: page
          in: query
          type: integer
          description: Page number for pagination.
        - name: page_size
          in: query
          type: integer
          description: Number of results per page (max 100).
        - name: status
          in: query
          type: string
          description: Filter matters by status.
        - name: practice_area
          in: query
          type: string
          description: Filter matters by practice area.
      - name: creatematter
        method: POST
        description: Create Matter
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: matters-id
      path: /matters/{id}
      operations:
      - name: getmatter
        method: GET
        description: Get Matter
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: Matter ID.
          required: true
      - name: updatematter
        method: PATCH
        description: Update Matter
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: Matter ID.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: basic
      username: '{{env.SIMPLELEGAL_USER}}'
      password: '{{env.SIMPLELEGAL_PASS}}'
  exposes:
  - type: rest
    namespace: simplelegal-matters-rest
    port: 8080
    description: REST adapter for SimpleLegal API — Matters. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/matters
      name: matters
      description: REST surface for matters.
      operations:
      - method: GET
        name: listmatters
        description: List Matters
        call: simplelegal-matters.listmatters
        with:
          page: rest.page
          page_size: rest.page_size
          status: rest.status
          practice_area: rest.practice_area
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: creatematter
        description: Create Matter
        call: simplelegal-matters.creatematter
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/matters/{id}
      name: matters-id
      description: REST surface for matters-id.
      operations:
      - method: GET
        name: getmatter
        description: Get Matter
        call: simplelegal-matters.getmatter
        with:
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: updatematter
        description: Update Matter
        call: simplelegal-matters.updatematter
        with:
          id: rest.id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: simplelegal-matters-mcp
    port: 9090
    transport: http
    description: MCP adapter for SimpleLegal API — Matters. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: list-matters
      description: List Matters
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: simplelegal-matters.listmatters
      with:
        page: tools.page
        page_size: tools.page_size
        status: tools.status
        practice_area: tools.practice_area
      outputParameters:
      - type: object
        mapping: $.
    - name: create-matter
      description: Create Matter
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: simplelegal-matters.creatematter
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-matter
      description: Get Matter
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: simplelegal-matters.getmatter
      with:
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: update-matter
      description: Update Matter
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: simplelegal-matters.updatematter
      with:
        id: tools.id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.