Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Mireye

Scalekit connector
Open markdown

The Mireye connector lets your AI agent act in each user's Mireye account. Each user connects their own Mireye API key once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 21 tools.

Tools
21
What they doRead · write · destructive
10 · 11 · 010 read11 write0 destructive
Users sign in with

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 Mireye connection

    In AgentKit > Connections, create a Mireye connection. The name you give it is the connection_name your code passes. See Configure connections.

    Console steps with screenshots

    Mireye connections use a Mireye API key. Fetch, Geocode and field-request tools are free. Enrich, Search, Ask and drive-time tools spend your Mireye balance, and they need a key created after you accepted Mireye’s current terms.

    1. Create a Mireye API key

      Sign in to the Mireye dashboard and accept the current terms. The dashboard creates a default key; you can also create a named key for this app. Copy the key when it appears, because Mireye doesn’t show it again. Keys start with mry_.

      A key created before you accepted Mireye’s current terms can call the free tools only. To use paid tools, create a new key after accepting.

    2. Create the connection

      In the Scalekit dashboard, go to AgentKit > Connections > Create Connection, find Mireye and click Create. The connection name is the connection_name your code passes.

    3. Add a connected account

      To test, open the connection, click the Connected Accounts tab > Add Account, enter the user’s identifier, such as user_123, and paste the key into API Key.

      In production, each user opens the authorization link and enters their own key there.

    Call paid tools safely

    Paid tools, such as mireye_parcel_enrich, mireye_parcels_search, mireye_location_ask and mireye_proximity_distance, take two inputs that control spend:

    • idempotency_key (required): a key you choose for this piece of work, 8 to 128 letters, digits, hyphens or underscores. Mireye keeps working if the call times out. Repeat the call with the same key and identical inputs to get the saved result without a second charge. Use a new key for new work; reusing a key with different inputs returns 409 idempotency_conflict.
    • max_cost_usd (optional): a spending ceiling for the call, as a decimal string such as "0.10". Mireye refuses the call with 402 if the price is above the ceiling or your available balance.
  4. 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 = 'mireye'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Mireye:', 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: 'mireye_enrich_fields_list',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their Mireye credentials there. If your app already has a user's credentials, add the account from your backend instead, as the console steps above show. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • mireye_address_geocodeResolve a US street address to a coordinate and report how precise that coordinate is.Read-only

    Geocode Address

    Resolve a US street address to a coordinate and report how precise that coordinate is. Returns lat, lng, accuracy, accuracy_type (rooftop, or range_interpolation, which can be off by about 2.9 km in rural areas), match_type, normalized_address, provider, source, parcel_grade and precision_note. Use mireye_address_geocode to check or reuse a coordinate before calling other tools with lat and lng. mireye_location_fetch, mireye_location_ask and mireye_parcel_enrich also accept an address directly and return the same geocode block. Free.

    Inputs

    addressstringrequired
    A full US street address to turn into a coordinate, 1 to 256 characters, with house number, street, city and state or ZIP. A bare street with no locality, or an address the geocoder can only place at a ZIP, city or county centroid, is rejected with 404 address_too_coarse. Example: 350 5th Ave, New York, NY 10118.
  • mireye_enrich_fields_listList every field ID and preset accepted by mireye_parcel_enrich.Read-only

    List Enrich Fields

    List every field ID and preset accepted by mireye_parcel_enrich. Returns pricing (the Enrich price per plan and when it is charged), presets (name, description and fields) and fields (name, type, unit, description, interpretation_hints, null_meaning, source and presets). Use mireye_enrich_fields_list to pick a small fields or preset selection before enriching a parcel. Use mireye_fetch_fields_list for free Fetch fields and mireye_search_fields_list for Search filters. Free.

    Inputs

    This tool takes no inputs.

  • mireye_fetch_fields_listList every field and preset available to mireye_location_fetch and mireye_run_create.Read-only

    List Fetch Fields

    List every field and preset available to mireye_location_fetch and mireye_run_create. Returns fields (name, type, unit, description, interpretation_hints, null_meaning, layer, source, source_url, presets and price, which is 0 for Fetch), presets (each preset's field names), us_envelope (the accepted coordinate range) and version. Use mireye_fetch_fields_list to choose valid field names or a preset before fetching. Use mireye_enrich_fields_list for mireye_parcel_enrich fields and mireye_search_fields_list for mireye_parcels_search names. The response is large (about 350 fields). Free.

    Inputs

    This tool takes no inputs.

  • mireye_field_request_getGet the current status of a field request filed with mireye_field_request_create.Read-only

    Get Field Request

    Get the current status of a field request filed with mireye_field_request_create. Returns request_id, status (received, screening, matched, awaiting_confirm, rejected, queued, claimed, building, in_review, approved, publishing, live, blocked or expired), waiting_on, queue_position, estimated_ready_at, resolved_locations, disposition, resume (the fetch call that answers the original ask), context_blob, created_at and updated_at. Use mireye_field_request_get to poll a request; when status is live, run its resume call with mireye_location_fetch. Free. Requires a request_id from mireye_field_request_create.

    Inputs

    request_idstringrequired
    The request_id returned by mireye_field_request_create. Requests are visible only to the credential that filed them; an unknown id, or another account's, returns 404 field_request_not_found. Example: fr_5d81c02e94aa4f31b7c6d2a90e8f1c3b.
  • mireye_location_fetchFetch free public data fields for one US coordinate or street address, such as elevation, flood zone, wetlands, terrain, land cover and distance to nearby infrastructure.Read-only

    Fetch Location Data

    Fetch free public data fields for one US coordinate or street address, such as elevation, flood zone, wetlands, terrain, land cover and distance to nearby infrastructure. Returns each field with its value, unit, source, source_url, confidence and status, plus partial_failures for fields that failed, resolved_location, and a geocode block when you sent an address. Use mireye_location_fetch when you know which fields you need. Use mireye_location_ask for a plain-language question, mireye_parcel_enrich for parcel data such as owner, zoning or boundaries, and mireye_run_create for up to 25 locations at once. Free on every plan and usually answers in seconds, but satellite-imagery fields can take up to 60 s and road or building fields up to 35 s; submit those through mireye_run_create. Pick field names or a preset from mireye_fetch_fields_list.

    Inputs

    addressstring
    A full US street address to fetch data for (house number, street, city, state and ZIP), 1 to 256 characters. Mireye geocodes it first and returns a geocode block with the match quality. Use this instead of lat and lng; never send both. A bare street with no city or ZIP is rejected as too coarse. Example: 350 5th Ave, New York, NY 10118.
    fieldsarray
    Catalog field names to fetch at the location, from mireye_fetch_fields_list. Send fields, preset or both (the preset expands first and these are added to it). At most 50 fields outside the chosen preset. Parcel fields such as owner, zoning or boundaries are not free and are rejected here; use mireye_parcel_enrich for those. Example: ["elevation", "coast_distance_m"].
    latnumber
    Latitude of the US point to fetch data for, in decimal degrees (WGS84). Send lat and lng together, or send address instead; never both. Example: 40.7128.
    lngnumber
    Longitude of the US point to fetch data for, in decimal degrees (WGS84, negative in the western hemisphere). Send lat and lng together, or send address instead; never both. Example: -74.006.
    presetstring
    A named bundle of fields to fetch, for a common use case. For example flood_risk returns elevation, floodplain, wetland and surface-water fields, and terrain returns elevation, slope, aspect, coast distance, soil drainage and bedrock depth. mireye_fetch_fields_list lists each preset's fields. Send fields, preset or both. Example: flood_risk.one of terrainflood_riskwildfire_underwriteland_coversite_selectionbuilding_lookuppoints_of_interestutilitiesboundariessolar_sitingwind_sitingstorage_sitingdata_center_sitinggrid_interconnectnatural_hazard
  • mireye_operation_getGet the saved result of a paid Mireye operation by its operation_id.Read-only

    Get Paid Operation

    Get the saved result of a paid Mireye operation by its operation_id. Returns the operation's saved result with its billing receipt. Results are kept for 30 days. Returns 409 operation_in_progress with Retry-After while the work or its saving is still running, 410 operation_failed if it ended without a billed result, and 410 result_not_retained with a charge receipt if a charged result could not be saved. Use mireye_operation_get to recover a paid result when you have its operation_id. When you only have the idempotency key, repeat the original call with the same key and identical inputs instead. Free. Requires an operation_id from a paid call.

    Inputs

    operation_idstringrequired
    The operation_id of a paid call, from the billing receipt (billing.operation_id) of mireye_parcels_search, mireye_parcel_enrich, mireye_location_ask, mireye_site_ask or a mireye_proximity_* tool, or from a paid error body. Example: op_4b1d9c2e41b84d0f.
  • mireye_plans_listList Mireye's current plans and dollar prices.Read-only

    List Plans and Prices

    List Mireye's current plans and dollar prices. Returns the public rate card: each plan's monthly price and allowance, the unit prices for Enrich, Search, driving calculations and Ask, and request-rate limits. Use mireye_plans_list to check what a paid call will cost before making it. Free.

    Inputs

    This tool takes no inputs.

  • mireye_run_getGet the status, progress and result of a run submitted with mireye_run_create.Read-only

    Get Run

    Get the status, progress and result of a run submitted with mireye_run_create. Returns run_id, kind, status (queued, running, done or failed), progress (done and total), created_at, updated_at, expires_at, the submitted request, and result once done: the same body mireye_location_fetch returns, for each location in input order, or an ok:false entry with its error. A failed run carries error with error, message and retryable. Use mireye_run_get to poll a run until status is done or failed. A run_interrupted failure is retryable: submit the same request again with mireye_run_create. Requires a run_id from mireye_run_create.

    Inputs

    run_idstringrequired
    The run_id returned by mireye_run_create. A run is visible only to the account that submitted it and expires 30 days after submission; an unknown, expired or other account's id returns 404 run_not_found. Example: run_a1b2c3d4e5f6.