Chainlens · Capability

Chainlens — Metadata-Controller

Chainlens — Metadata-Controller. 2 operations. Lead operation: Chainlens list contracts by swarmhash. Self-contained Naftiko capability covering one Chainlens business surface.

Run with Naftiko ChainlensMetadata-Controller

What You Can Do

GET
Findcontractsbyswarmhash — Chainlens list contracts by swarmhash
/v1/metadata/{fileid}/contracts
GET
Getmetadata — Chainlens Retrieve metadata.
/v1/metadata/{swarmhash}

MCP Tools

chainlens-list-contracts-swarmhash

Chainlens list contracts by swarmhash

read-only idempotent
chainlens-retrieve-metadata

Chainlens Retrieve metadata.

read-only idempotent

Capability Spec

chainlens-metadata-controller.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Chainlens — Metadata-Controller
  description: 'Chainlens — Metadata-Controller. 2 operations. Lead operation: Chainlens list contracts by swarmhash. Self-contained
    Naftiko capability covering one Chainlens business surface.'
  tags:
  - Chainlens
  - Metadata-Controller
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    CHAINLENS_API_KEY: CHAINLENS_API_KEY
capability:
  consumes:
  - type: http
    namespace: chainlens-metadata-controller
    baseUri: ''
    description: Chainlens — Metadata-Controller business capability. Self-contained, no shared references.
    resources:
    - name: metadata-fileId-contracts
      path: /metadata/{fileId}/contracts
      operations:
      - name: findcontractsbyswarmhash
        method: GET
        description: Chainlens list contracts by swarmhash
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: fileId
          in: path
          type: string
          description: The file id of the metadata.
          required: true
        - name: query
          in: query
          type: string
          required: true
    - name: metadata-swarmHash
      path: /metadata/{swarmHash}
      operations:
      - name: getmetadata
        method: GET
        description: Chainlens Retrieve metadata.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: swarmHash
          in: path
          type: string
          description: The swarm hash of the metadata.
          required: true
  exposes:
  - type: rest
    namespace: chainlens-metadata-controller-rest
    port: 8080
    description: REST adapter for Chainlens — Metadata-Controller. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/metadata/{fileid}/contracts
      name: metadata-fileid-contracts
      description: REST surface for metadata-fileId-contracts.
      operations:
      - method: GET
        name: findcontractsbyswarmhash
        description: Chainlens list contracts by swarmhash
        call: chainlens-metadata-controller.findcontractsbyswarmhash
        with:
          fileId: rest.fileId
          query: rest.query
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/metadata/{swarmhash}
      name: metadata-swarmhash
      description: REST surface for metadata-swarmHash.
      operations:
      - method: GET
        name: getmetadata
        description: Chainlens Retrieve metadata.
        call: chainlens-metadata-controller.getmetadata
        with:
          swarmHash: rest.swarmHash
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: chainlens-metadata-controller-mcp
    port: 9090
    transport: http
    description: MCP adapter for Chainlens — Metadata-Controller. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: chainlens-list-contracts-swarmhash
      description: Chainlens list contracts by swarmhash
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: chainlens-metadata-controller.findcontractsbyswarmhash
      with:
        fileId: tools.fileId
        query: tools.query
      outputParameters:
      - type: object
        mapping: $.
    - name: chainlens-retrieve-metadata
      description: Chainlens Retrieve metadata.
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: chainlens-metadata-controller.getmetadata
      with:
        swarmHash: tools.swarmHash
      outputParameters:
      - type: object
        mapping: $.