{"openapi":"3.1.0","info":{"title":"Lens (BYOK) API","version":"0.1.0","description":"Lens (BYOK) lets an AI assistant read your own Lens data through the Lens API with a key you supply (Lens API access token (scholarly or patent API plan)). Read-only: 5 tools (search_scholarly_works, get_scholarly_work, find_scholarly_work_by_doi, search_patents, get_patent). The BYOK key travels with each request, is used for that one call only and is never stored, logged or cached; it is only...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-lens.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-lens/docs"},"termsOfService":"https://connectorbay.com/byok-lens/terms"},"servers":[{"url":"https://byok-lens.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-lens/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/search_scholarly_works":{"post":{"operationId":"search_scholarly_works","summary":"Search Lens scholarly works (papers, books, datasets) with a Lens query string; returns total hits and per-record title,","description":"Search Lens scholarly works (papers, books, datasets) with a Lens query string; returns total hits and per-record title, year, source, identifiers, citation counts and open access status. Use for \"Find papers about malaria vaccine published after 2020 on Lens\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"query":{"description":"Lens query string with operators AND, OR, NOT and fielded terms, for example 'title:(malaria vaccine) AND year_published:[2020 TO 2026]'. Searchable fields include title, abstract, author.display_name, year_published, field_of_study, source.title.","maxLength":500,"title":"Query","type":"string"},"size":{"anyOf":[{"maximum":50,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many records to return (1 to 50). Each record returned counts against the monthly record quota of the plan.","title":"Size"},"offset":{"anyOf":[{"maximum":9950,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"How many records to skip from the start of the result list (0 to 9950).","title":"Offset"}},"required":["query"],"title":"search_scholarly_worksArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_scholarly_work":{"post":{"operationId":"get_scholarly_work","summary":"Get one Lens scholarly work by its Lens ID, with title, abstract, source, identifiers, citation counts and open access s","description":"Get one Lens scholarly work by its Lens ID, with title, abstract, source, identifiers, citation counts and open access status. Use for \"Show the Lens record 086-713-276-176-892\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"lens_id":{"description":"Lens ID of the scholarly work, for example '086-713-276-176-892'.","maxLength":40,"title":"Lens Id","type":"string"}},"required":["lens_id"],"title":"get_scholarly_workArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/find_scholarly_work_by_doi":{"post":{"operationId":"find_scholarly_work_by_doi","summary":"Look up scholarly works on Lens by DOI and return the matching records with title, year, source and citation counts. Use","description":"Look up scholarly works on Lens by DOI and return the matching records with title, year, source and citation counts. Use for \"Is the paper with DOI 10.1016/j.ejca.2015.05.019 on Lens and how often is it cited\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"doi":{"description":"DOI of the work without the https://doi.org/ prefix, for example '10.1016/j.ejca.2015.05.019'.","maxLength":200,"title":"Doi","type":"string"}},"required":["doi"],"title":"find_scholarly_work_by_doiArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/search_patents":{"post":{"operationId":"search_patents","summary":"Search Lens patent documents with a Lens query string; returns total hits and per-record jurisdiction, number, kind, pub","description":"Search Lens patent documents with a Lens query string; returns total hits and per-record jurisdiction, number, kind, publication date, title, parties and legal status. Use for \"Find recent European patents about solid state batteries on Lens\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"query":{"description":"Lens query string with operators AND, OR, NOT and fielded terms, for example 'title:(solid state battery) AND jurisdiction:EP'. Dates use date_published:[2024-01-01 TO 2026-12-31].","maxLength":500,"title":"Query","type":"string"},"size":{"anyOf":[{"maximum":50,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many records to return (1 to 50). Each record returned counts against the monthly record quota of the plan.","title":"Size"},"offset":{"anyOf":[{"maximum":9950,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"How many records to skip from the start of the result list (0 to 9950).","title":"Offset"}},"required":["query"],"title":"search_patentsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_patent":{"post":{"operationId":"get_patent","summary":"Get one Lens patent document by its Lens ID, with title, abstract, applicants, inventors and legal status. Use for \"Show","description":"Get one Lens patent document by its Lens ID, with title, abstract, applicants, inventors and legal status. Use for \"Show the Lens patent record 031-156-664-516-153\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"lens_id":{"description":"Lens ID of the patent document, for example '031-156-664-516-153'.","maxLength":40,"title":"Lens Id","type":"string"}},"required":["lens_id"],"title":"get_patentArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}