naftiko: 1.0.0-alpha2 info: label: Lens API — Scholarly description: 'Lens API — Scholarly. 3 operations. Lead operation: Search scholarly works (GET). Self-contained Naftiko capability covering one Lens business surface.' tags: - Lens - Scholarly created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: LENS_API_KEY: LENS_API_KEY capability: consumes: - type: http namespace: lens-scholarly baseUri: https://api.lens.org description: Lens API — Scholarly business capability. Self-contained, no shared references. resources: - name: scholarly-search path: /scholarly/search operations: - name: get method: GET description: Search scholarly works (GET) outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: query in: query type: string description: Lucene-style query string (e.g. "title:graphene AND year:2024"). required: true - name: size in: query type: integer description: Number of records per page (max 1000 for Patents/Scholarly subject to plan). - name: from in: query type: integer description: Offset for offset/size pagination. Cannot exceed 10000 in total. - name: sort in: query type: string description: Comma-separated sort directives (e.g. "desc(patent_citation_count)"). - name: include in: query type: string description: Comma-separated list of fields to include in the response. - name: exclude in: query type: string description: Comma-separated list of fields to exclude from the response. - name: post method: POST description: Search scholarly works (POST) outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: scholarly-lens_id path: /scholarly/{lens_id} operations: - name: get method: GET description: Get a scholarly work by Lens ID outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: lens_id in: path type: string description: Unique Lens identifier for the scholarly work. required: true authentication: type: bearer token: '{{env.LENS_API_KEY}}' exposes: - type: rest namespace: lens-scholarly-rest port: 8080 description: REST adapter for Lens API — Scholarly. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/scholarly/search name: scholarly-search description: REST surface for scholarly-search. operations: - method: GET name: get description: Search scholarly works (GET) call: lens-scholarly.get with: query: rest.query size: rest.size from: rest.from sort: rest.sort include: rest.include exclude: rest.exclude outputParameters: - type: object mapping: $. - method: POST name: post description: Search scholarly works (POST) call: lens-scholarly.post with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/scholarly/{lens-id} name: scholarly-lens-id description: REST surface for scholarly-lens_id. operations: - method: GET name: get description: Get a scholarly work by Lens ID call: lens-scholarly.get with: lens_id: rest.lens_id outputParameters: - type: object mapping: $. - type: mcp namespace: lens-scholarly-mcp port: 9090 transport: http description: MCP adapter for Lens API — Scholarly. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: search-scholarly-works-get description: Search scholarly works (GET) hints: readOnly: true destructive: false idempotent: true call: lens-scholarly.get with: query: tools.query size: tools.size from: tools.from sort: tools.sort include: tools.include exclude: tools.exclude outputParameters: - type: object mapping: $. - name: search-scholarly-works-post description: Search scholarly works (POST) hints: readOnly: true destructive: false idempotent: false call: lens-scholarly.post with: body: tools.body outputParameters: - type: object mapping: $. - name: get-scholarly-work-lens-id description: Get a scholarly work by Lens ID hints: readOnly: true destructive: false idempotent: true call: lens-scholarly.get with: lens_id: tools.lens_id outputParameters: - type: object mapping: $.