Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Google Cloud Vision

Scalekit connector
Open markdown

The Google Cloud Vision connector lets your AI agent act in each user's Google Cloud Vision account. Each user signs in to Google Cloud Vision once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 27 tools.

Tools
27
What they doRead · write · destructive
9 · 13 · 59 read13 write5 destructive
Users sign in with
OAuth app
Your own Google app

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the Google Cloud Vision connection

    In AgentKit > Connections, create a Google Cloud Vision connection and copy its redirect URI. The name you give it is the connection_name your code passes. See Configure connections.

  4. Register a Google OAuth app

    Google Cloud Vision connections use your own OAuth app. Register one with Google and add the redirect URI you copied.

    Then enter the app's Client ID and Client Secret on the Google Cloud Vision connection.

  5. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'googlecloudvision'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Google Cloud Vision:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'googlecloudvision_operations_list',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user signs in once. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • googlecloudvision_operations_getGet the current status and result of a Google Cloud Vision long-running operation by its full operation name.Read-only

    Get Operation

    Get the current status and result of a Google Cloud Vision long-running operation by its full operation name. Returns an Operation object with name, an optional metadata object, a done boolean, and — once done — either an error or the operation-specific response payload (e.g. AsyncBatchAnnotateImagesResponse, AsyncBatchAnnotateFilesResponse, or ImportProductSetsResponse). Use this to poll a job after starting it; use operations_list instead to browse all in-flight or past operations. Requires an operation name returned by an async-starting call such as images_async_batch_annotate, files_async_batch_annotate, product_purge, or product_set_import.

    Inputs

    namestringrequired
    Full resource name of the long-running operation to poll, exactly as returned by the call that started it — depending on which call, this may be a bare "operations/{operation_id}", or prefixed with "projects/{project}/" and/or "locations/{location}/" (e.g. files_async_batch_annotate returns a project-scoped name; product_purge/product_set_import return a location-scoped one). Copy it verbatim — do not strip or reconstruct the prefix.
  • googlecloudvision_operations_listList Google Cloud Vision long-running operations, optionally filtered by an AIP-160 filter expression.Read-only

    List Operations

    List Google Cloud Vision long-running operations, optionally filtered by an AIP-160 filter expression. Returns operations (an array of Operation objects with name, metadata, and done) and a nextPageToken for fetching further pages when more results exist. The name field must be exactly the literal string "operations" — Vision API's ListOperations binding only accepts this one value (confirmed by the API's own published parameter pattern, `^operations$`); it does not support listing scoped by project or location, even though individual operation names returned by other calls may be project- and/or location-prefixed. To find one specific operation whose name you don't have, list here and match on the returned name/metadata; once you have the name, use operations_get to poll it directly (operations_get accepts the name in whatever form it was returned, prefixed or not). Use operations_list to browse in-flight or past operations, e.g. to find one you didn't keep the name of. Use operations_get instead once you already have a specific operation name to poll its status.

    Inputs

    filterstring
    Optional AIP-160 filter expression to restrict which operations are returned (e.g. done=false to see only in-flight jobs). Leave blank to list all operations in the collection.
    namestring
    Must be exactly the literal string "operations" — this is the only value Vision API's ListOperations endpoint accepts (enforced server-side; the API does not support listing scoped by project or location). Leave this at the default.default operations
    page_sizeinteger
    Maximum number of operations to return per page. If unset, the server chooses a default page size.
    page_tokenstring
    Pagination token from a previous operations_list call's nextPageToken, used to fetch the next page of results.
    return_partial_successboolean
    When true, reachable operations are returned normally and unreachable ones are reported in the response's unreachable field instead of causing an error. Only meaningful when listing across collections; not documented as supported for Vision API's single flat operations collection, so leave blank unless you have a specific reason to set it.
  • googlecloudvision_product_getGet a single product from Google Cloud Vision Product Search by its full resource name.Read-only

    Get Product

    Get a single product from Google Cloud Vision Product Search by its full resource name. Returns the Product object: name, displayName, productCategory, description, and productLabels. Use this when you already have a product's full resource name (e.g. returned by product_create or product_list). Use product_list to browse or find a product when you don't already know its resource name.

    Inputs

    namestringrequired
    The full resource name of the product to retrieve, in the form projects/{project_id}/locations/{location_id}/products/{product_id}. Example: projects/my-project/locations/us-east1/products/sku-12345.
  • googlecloudvision_product_listList all products in a Google Cloud Vision Product Search catalog under a project and location, paginated.Read-only

    List Products

    List all products in a Google Cloud Vision Product Search catalog under a project and location, paginated. Returns an array of Product objects (name, displayName, productCategory, description, productLabels) plus a nextPageToken when more results are available. Use this to browse every product in a project/location. Use product_set_products_list instead to see only the products belonging to one product set, and product_get when you already know a single product's full resource name.

    Inputs

    parentstringrequired
    The project and location whose products to list, in the form projects/{project_id}/locations/{location_id}. Example: projects/my-project/locations/us-east1.
    page_sizeinteger
    Maximum number of products to return per page. The service may return fewer than this value. If unspecified, a default page size is used; the maximum allowed value is 100 (larger values are coerced down).
    page_tokenstring
    A page token received from a previous product_list call's nextPageToken, used to retrieve the next page of results.
  • googlecloudvision_product_set_getRetrieve details of a single Google Cloud Vision product set by its full resource name.Read-only

    Get Product Set

    Retrieve details of a single Google Cloud Vision product set by its full resource name. Returns a ProductSet object with name, displayName, and index status (indexTime when last indexed, or indexError if indexing failed). Use this to check a specific product set's current state; use product_set_list to browse all product sets in a project/location instead.

    Inputs

    namestringrequired
    Full resource name of the product set to retrieve, in the form projects/{project_id}/locations/{location_id}/productSets/{product_set_id}.
  • googlecloudvision_product_set_listList all product sets in a Google Cloud Vision project and location, regardless of which products belong to them.Read-only

    List Product Sets

    List all product sets in a Google Cloud Vision project and location, regardless of which products belong to them. Returns an array of ProductSet objects (name, displayName, indexTime/indexError) plus a nextPageToken for pagination. Use this to browse every product set defined for the project. Use product_set_products_list instead once you have a specific product set and need to see the products inside it.

    Inputs

    parentstringrequired
    The project and location whose product sets to list, in the form projects/{project_id}/locations/{location_id}.
    page_sizeinteger
    Maximum number of product sets to return per page. The service may return fewer than this value. Defaults to 10 if not specified; maximum is 100.
    page_tokenstring
    A pagination token received from a previous product_set_list call's nextPageToken field. Pass this to retrieve the next page of results.
  • googlecloudvision_product_set_products_listList only the products that belong to one specific Google Cloud Vision product set.Read-only

    List Products In Product Set

    List only the products that belong to one specific Google Cloud Vision product set. Returns an array of Product objects (name, displayName, productCategory, productLabels) plus a nextPageToken for pagination. Distinct from product_list, which lists ALL products in a project/location regardless of set membership — use this tool instead when you already have a product set and want just its members. Use product_set_add_product / product_set_remove_product to change which products belong to the set.

    Inputs

    namestringrequired
    Full resource name of the product set whose products to list, in the form projects/{project_id}/locations/{location_id}/productSets/{product_set_id}. Named 'name' (not 'parent') because this is how the underlying API labels it, even though it functions as the scope for this list call.
    page_sizeinteger
    Maximum number of products to return per page. The service may return fewer than this value. Defaults to 10 if not specified; maximum is 100.
    page_tokenstring
    A pagination token received from a previous product_set_products_list call's nextPageToken field. Pass this to retrieve the next page of results.
  • googlecloudvision_reference_image_getGet a single reference image by its full resource name.Read-only

    Get Reference Image

    Get a single reference image by its full resource name. Returns a ReferenceImage object with its resource name, GCS uri, and any bounding polygons. Use reference_image_get to fetch one known reference image; use reference_image_list to browse or find the right one first. Prerequisite: the reference image must already exist — create it with reference_image_create.

    Inputs

    namestringrequired
    Full resource name of the reference image to retrieve, in the form "projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}".