Supabase · Capability

Supabase Database REST API — RPC

Supabase Database REST API — RPC. 1 operations. Lead operation: Invoke a PostgreSQL function. Self-contained Naftiko capability covering one Supabase business surface.

Run with Naftiko SupabaseRPC

What You Can Do

POST
Invokefunction — Invoke a PostgreSQL function
/v1/rpc/{function-name}

MCP Tools

invoke-postgresql-function

Invoke a PostgreSQL function

Capability Spec

database-rest-rpc.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Supabase Database REST API — RPC
  description: 'Supabase Database REST API — RPC. 1 operations. Lead operation: Invoke a PostgreSQL function. Self-contained
    Naftiko capability covering one Supabase business surface.'
  tags:
  - Supabase
  - RPC
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    SUPABASE_API_KEY: SUPABASE_API_KEY
capability:
  consumes:
  - type: http
    namespace: database-rest-rpc
    baseUri: https://{project_ref}.supabase.co/rest/v1
    description: Supabase Database REST API — RPC business capability. Self-contained, no shared references.
    resources:
    - name: rpc-function_name
      path: /rpc/{function_name}
      operations:
      - name: invokefunction
        method: POST
        description: Invoke a PostgreSQL function
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: function_name
          in: path
          type: string
          description: Name of the PostgreSQL function to invoke
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    authentication:
      type: bearer
      token: '{{env.SUPABASE_API_KEY}}'
  exposes:
  - type: rest
    namespace: database-rest-rpc-rest
    port: 8080
    description: REST adapter for Supabase Database REST API — RPC. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/rpc/{function-name}
      name: rpc-function-name
      description: REST surface for rpc-function_name.
      operations:
      - method: POST
        name: invokefunction
        description: Invoke a PostgreSQL function
        call: database-rest-rpc.invokefunction
        with:
          function_name: rest.function_name
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: database-rest-rpc-mcp
    port: 9090
    transport: http
    description: MCP adapter for Supabase Database REST API — RPC. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: invoke-postgresql-function
      description: Invoke a PostgreSQL function
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: database-rest-rpc.invokefunction
      with:
        function_name: tools.function_name
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.