Chainlens · Capability

Chainlens — Token-Controller

Chainlens — Token-Controller. 3 operations. Lead operation: Chainlens Retrieve token contracts.. Self-contained Naftiko capability covering one Chainlens business surface.

Run with Naftiko ChainlensToken-Controller

What You Can Do

GET
Findtokens — Chainlens Retrieve token contracts.
/v1/tokens
GET
Gettoken — Chainlens Retrieve a token by its address hash.
/v1/tokens/{addresshash}
GET
Findtokensbytokenid — Chainlens Retrieve token contracts by tokenId.
/v1/tokens/{addresshash}/{tokenid}

MCP Tools

chainlens-retrieve-token-contracts

Chainlens Retrieve token contracts.

read-only idempotent
chainlens-retrieve-token-its-address

Chainlens Retrieve a token by its address hash.

read-only idempotent
chainlens-retrieve-token-contracts-tokenid

Chainlens Retrieve token contracts by tokenId.

read-only idempotent

Capability Spec

chainlens-token-controller.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Chainlens — Token-Controller
  description: 'Chainlens — Token-Controller. 3 operations. Lead operation: Chainlens Retrieve token contracts.. Self-contained
    Naftiko capability covering one Chainlens business surface.'
  tags:
  - Chainlens
  - Token-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-token-controller
    baseUri: ''
    description: Chainlens — Token-Controller business capability. Self-contained, no shared references.
    resources:
    - name: tokens
      path: /tokens
      operations:
      - name: findtokens
        method: GET
        description: Chainlens Retrieve token contracts.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: query
          in: query
          type: string
          required: true
    - name: tokens-addressHash
      path: /tokens/{addressHash}
      operations:
      - name: gettoken
        method: GET
        description: Chainlens Retrieve a token by its address hash.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: addressHash
          in: path
          type: string
          description: The address hash identifying the contract.
          required: true
    - name: tokens-addressHash-tokenId
      path: /tokens/{addressHash}/{tokenId}
      operations:
      - name: findtokensbytokenid
        method: GET
        description: Chainlens Retrieve token contracts by tokenId.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: addressHash
          in: path
          type: string
          description: The address hash identifying the contract.
          required: true
        - name: tokenId
          in: path
          type: string
          required: true
  exposes:
  - type: rest
    namespace: chainlens-token-controller-rest
    port: 8080
    description: REST adapter for Chainlens — Token-Controller. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/tokens
      name: tokens
      description: REST surface for tokens.
      operations:
      - method: GET
        name: findtokens
        description: Chainlens Retrieve token contracts.
        call: chainlens-token-controller.findtokens
        with:
          query: rest.query
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/tokens/{addresshash}
      name: tokens-addresshash
      description: REST surface for tokens-addressHash.
      operations:
      - method: GET
        name: gettoken
        description: Chainlens Retrieve a token by its address hash.
        call: chainlens-token-controller.gettoken
        with:
          addressHash: rest.addressHash
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/tokens/{addresshash}/{tokenid}
      name: tokens-addresshash-tokenid
      description: REST surface for tokens-addressHash-tokenId.
      operations:
      - method: GET
        name: findtokensbytokenid
        description: Chainlens Retrieve token contracts by tokenId.
        call: chainlens-token-controller.findtokensbytokenid
        with:
          addressHash: rest.addressHash
          tokenId: rest.tokenId
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: chainlens-token-controller-mcp
    port: 9090
    transport: http
    description: MCP adapter for Chainlens — Token-Controller. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: chainlens-retrieve-token-contracts
      description: Chainlens Retrieve token contracts.
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: chainlens-token-controller.findtokens
      with:
        query: tools.query
      outputParameters:
      - type: object
        mapping: $.
    - name: chainlens-retrieve-token-its-address
      description: Chainlens Retrieve a token by its address hash.
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: chainlens-token-controller.gettoken
      with:
        addressHash: tools.addressHash
      outputParameters:
      - type: object
        mapping: $.
    - name: chainlens-retrieve-token-contracts-tokenid
      description: Chainlens Retrieve token contracts by tokenId.
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: chainlens-token-controller.findtokensbytokenid
      with:
        addressHash: tools.addressHash
        tokenId: tools.tokenId
      outputParameters:
      - type: object
        mapping: $.