Synapse · Capability

Synapse Admin API — Rooms

Synapse Admin API — Rooms. 5 operations. Lead operation: Join User to Room. Self-contained Naftiko capability covering one Synapse business surface.

Run with Naftiko SynapseRooms

What You Can Do

POST
Joinusertoroom — Join User to Room
/v1/v1/join/{roomidoralias}
GET
Listrooms — List All Rooms
/v1/v1/rooms
GET
Getroom — Get Room Details
/v1/v1/rooms/{roomid}
DELETE
Deleteroom — Delete Room
/v1/v1/rooms/{roomid}
GET
Getroommembers — Get Room Members
/v1/v1/rooms/{roomid}/members

MCP Tools

join-user-room

Join User to Room

list-all-rooms

List All Rooms

read-only idempotent
get-room-details

Get Room Details

read-only idempotent
delete-room

Delete Room

idempotent
get-room-members

Get Room Members

read-only idempotent

Capability Spec

admin-rooms.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Synapse Admin API — Rooms
  description: 'Synapse Admin API — Rooms. 5 operations. Lead operation: Join User to Room. Self-contained Naftiko capability
    covering one Synapse business surface.'
  tags:
  - Synapse
  - Rooms
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    SYNAPSE_API_KEY: SYNAPSE_API_KEY
capability:
  consumes:
  - type: http
    namespace: admin-rooms
    baseUri: https://matrix.example.com/_synapse/admin
    description: Synapse Admin API — Rooms business capability. Self-contained, no shared references.
    resources:
    - name: v1-join-roomIdOrAlias
      path: /v1/join/{roomIdOrAlias}
      operations:
      - name: joinusertoroom
        method: POST
        description: Join User to Room
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: roomIdOrAlias
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: v1-rooms
      path: /v1/rooms
      operations:
      - name: listrooms
        method: GET
        description: List All Rooms
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: search_term
          in: query
          type: string
          description: Filter rooms by room ID, name, or canonical alias
        - name: order_by
          in: query
          type: string
          description: Sort order for results
        - name: dir
          in: query
          type: string
          description: Sort direction (forward/backward)
        - name: limit
          in: query
          type: integer
        - name: from
          in: query
          type: integer
    - name: v1-rooms-roomId
      path: /v1/rooms/{roomId}
      operations:
      - name: getroom
        method: GET
        description: Get Room Details
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: roomId
          in: path
          type: string
          description: The room ID (e.g. !abc123:example.com)
          required: true
      - name: deleteroom
        method: DELETE
        description: Delete Room
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: roomId
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: v1-rooms-roomId-members
      path: /v1/rooms/{roomId}/members
      operations:
      - name: getroommembers
        method: GET
        description: Get Room Members
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: roomId
          in: path
          type: string
          required: true
    authentication:
      type: bearer
      token: '{{env.SYNAPSE_API_KEY}}'
  exposes:
  - type: rest
    namespace: admin-rooms-rest
    port: 8080
    description: REST adapter for Synapse Admin API — Rooms. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/v1/join/{roomidoralias}
      name: v1-join-roomidoralias
      description: REST surface for v1-join-roomIdOrAlias.
      operations:
      - method: POST
        name: joinusertoroom
        description: Join User to Room
        call: admin-rooms.joinusertoroom
        with:
          roomIdOrAlias: rest.roomIdOrAlias
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/rooms
      name: v1-rooms
      description: REST surface for v1-rooms.
      operations:
      - method: GET
        name: listrooms
        description: List All Rooms
        call: admin-rooms.listrooms
        with:
          search_term: rest.search_term
          order_by: rest.order_by
          dir: rest.dir
          limit: rest.limit
          from: rest.from
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/rooms/{roomid}
      name: v1-rooms-roomid
      description: REST surface for v1-rooms-roomId.
      operations:
      - method: GET
        name: getroom
        description: Get Room Details
        call: admin-rooms.getroom
        with:
          roomId: rest.roomId
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleteroom
        description: Delete Room
        call: admin-rooms.deleteroom
        with:
          roomId: rest.roomId
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/rooms/{roomid}/members
      name: v1-rooms-roomid-members
      description: REST surface for v1-rooms-roomId-members.
      operations:
      - method: GET
        name: getroommembers
        description: Get Room Members
        call: admin-rooms.getroommembers
        with:
          roomId: rest.roomId
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: admin-rooms-mcp
    port: 9090
    transport: http
    description: MCP adapter for Synapse Admin API — Rooms. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: join-user-room
      description: Join User to Room
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: admin-rooms.joinusertoroom
      with:
        roomIdOrAlias: tools.roomIdOrAlias
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: list-all-rooms
      description: List All Rooms
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: admin-rooms.listrooms
      with:
        search_term: tools.search_term
        order_by: tools.order_by
        dir: tools.dir
        limit: tools.limit
        from: tools.from
      outputParameters:
      - type: object
        mapping: $.
    - name: get-room-details
      description: Get Room Details
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: admin-rooms.getroom
      with:
        roomId: tools.roomId
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-room
      description: Delete Room
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: admin-rooms.deleteroom
      with:
        roomId: tools.roomId
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-room-members
      description: Get Room Members
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: admin-rooms.getroommembers
      with:
        roomId: tools.roomId
      outputParameters:
      - type: object
        mapping: $.