Marginalia Search · Capability

Marginalia Search API — Filters

Marginalia Search API — Filters. 4 operations. Lead operation: List configured filters. Self-contained Naftiko capability covering one Marginalia Search business surface.

Run with Naftiko Marginalia SearchFilters

What You Can Do

GET
Listfilters — List configured filters
/v1/filter
GET
Getfilter — Retrieve a filter definition
/v1/filter/{name}
POST
Createfilter — Create a named filter
/v1/filter/{name}
DELETE
Deletefilter — Delete a filter
/v1/filter/{name}

MCP Tools

list-configured-filters

List configured filters

read-only idempotent
retrieve-filter-definition

Retrieve a filter definition

read-only idempotent
create-named-filter

Create a named filter

delete-filter

Delete a filter

idempotent

Capability Spec

marginalia-search-filters.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Marginalia Search API — Filters
  description: 'Marginalia Search API — Filters. 4 operations. Lead operation: List configured filters. Self-contained Naftiko
    capability covering one Marginalia Search business surface.'
  tags:
  - Marginalia Search
  - Filters
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    MARGINALIA_SEARCH_API_KEY: MARGINALIA_SEARCH_API_KEY
capability:
  consumes:
  - type: http
    namespace: marginalia-search-filters
    baseUri: https://api2.marginalia-search.com
    description: Marginalia Search API — Filters business capability. Self-contained, no shared references.
    resources:
    - name: filter
      path: /filter
      operations:
      - name: listfilters
        method: GET
        description: List configured filters
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: filter-name
      path: /filter/{name}
      operations:
      - name: getfilter
        method: GET
        description: Retrieve a filter definition
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createfilter
        method: POST
        description: Create a named filter
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deletefilter
        method: DELETE
        description: Delete a filter
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: apikey
      key: API-Key
      value: '{{env.MARGINALIA_SEARCH_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: marginalia-search-filters-rest
    port: 8080
    description: REST adapter for Marginalia Search API — Filters. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/filter
      name: filter
      description: REST surface for filter.
      operations:
      - method: GET
        name: listfilters
        description: List configured filters
        call: marginalia-search-filters.listfilters
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/filter/{name}
      name: filter-name
      description: REST surface for filter-name.
      operations:
      - method: GET
        name: getfilter
        description: Retrieve a filter definition
        call: marginalia-search-filters.getfilter
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createfilter
        description: Create a named filter
        call: marginalia-search-filters.createfilter
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletefilter
        description: Delete a filter
        call: marginalia-search-filters.deletefilter
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: marginalia-search-filters-mcp
    port: 9090
    transport: http
    description: MCP adapter for Marginalia Search API — Filters. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: list-configured-filters
      description: List configured filters
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: marginalia-search-filters.listfilters
      outputParameters:
      - type: object
        mapping: $.
    - name: retrieve-filter-definition
      description: Retrieve a filter definition
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: marginalia-search-filters.getfilter
      outputParameters:
      - type: object
        mapping: $.
    - name: create-named-filter
      description: Create a named filter
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: marginalia-search-filters.createfilter
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-filter
      description: Delete a filter
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: marginalia-search-filters.deletefilter
      outputParameters:
      - type: object
        mapping: $.