> ## Documentation Index
> Fetch the complete documentation index at: https://docs.goosybear.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Call automations.connect_tool

> Connect a sketched automation step to a tool — 'read their website here', 'add the people it found to my contacts', 'use HubSpot's create-contact tool here', 'pull the numbers with the analytics tool' — a platform tool, or one from an app or MCP server this workspace connected, named by its registry name, with its input. A connected CRM's tool is for a CRM app the member names. Call it on that ask, naming the step by its step_key and passing the version you last read — read first with `automations.get` when you have not read this automation, whose latest_version is the newest draft (a newer draft is refused as sketch.draft_moved carrying the newest draft, so a call may need one retry against the newest). It records where the tool comes from and, for a connected tool, the version of the tool list it was bound to, and answers with the tool's class: read runs on its own once switched on, while a write or high-leverage tool is named on the card switching the automation on raises. A tool from an app this workspace has not connected is refused as automation_binding.connector_not_connected, with a card offering the member the Connections page, where they connect it; any other refusal names its code, the input's path and its fix, so apply the fix and call again in the same turn. It saves a new draft version that runs nothing and spends nothing. Not for a step that is not a tool, such as an Ask, a wait, a message or finding a list of things across the web (a research step) — that is `automations.bind_step`.

Every result names the workspace it ran in. Say which workspace the answer is about. When the account has more than one workspace and none is selected, this tool refuses with `workspace_ambiguous` and lists the choices — offer them, never pick one.



## OpenAPI

````yaml /openapi.json post /api/v1/tools/automations.connect_tool
openapi: 3.1.0
info:
  title: Goosy Bear API
  version: 1.0.0-beta
  summary: Manage workspace content, projects, Data tables, Pages, library and credits.
  description: >-
    BETA. This API is in beta: paths, request shapes and response envelopes may
    change, and every response carries an `x-goosy-api: beta` header for as long
    as that is true. A change is additive, or it is deprecated first: a response
    to a call that uses a deprecated feature carries `Deprecation` and `Sunset`
    headers, and nothing is removed until at least 90 days after its
    deprecation. Pin the OpenAPI document you generated against and re-generate
    when it changes.
servers:
  - url: https://app.goosybear.ai
    description: Production
security:
  - tenantApiKey: []
paths:
  /api/v1/tools/automations.connect_tool:
    post:
      tags:
        - automations
      summary: Call automations.connect_tool
      description: >-
        Connect a sketched automation step to a tool — 'read their website
        here', 'add the people it found to my contacts', 'use HubSpot's
        create-contact tool here', 'pull the numbers with the analytics tool' —
        a platform tool, or one from an app or MCP server this workspace
        connected, named by its registry name, with its input. A connected CRM's
        tool is for a CRM app the member names. Call it on that ask, naming the
        step by its step_key and passing the version you last read — read first
        with `automations.get` when you have not read this automation, whose
        latest_version is the newest draft (a newer draft is refused as
        sketch.draft_moved carrying the newest draft, so a call may need one
        retry against the newest). It records where the tool comes from and, for
        a connected tool, the version of the tool list it was bound to, and
        answers with the tool's class: read runs on its own once switched on,
        while a write or high-leverage tool is named on the card switching the
        automation on raises. A tool from an app this workspace has not
        connected is refused as automation_binding.connector_not_connected, with
        a card offering the member the Connections page, where they connect it;
        any other refusal names its code, the input's path and its fix, so apply
        the fix and call again in the same turn. It saves a new draft version
        that runs nothing and spends nothing. Not for a step that is not a tool,
        such as an Ask, a wait, a message or finding a list of things across the
        web (a research step) — that is `automations.bind_step`.


        Every result names the workspace it ran in. Say which workspace the
        answer is about. When the account has more than one workspace and none
        is selected, this tool refuses with `workspace_ambiguous` and lists the
        choices — offer them, never pick one.
      operationId: call_automations_connect_tool
      parameters:
        - name: x-request-id
          in: header
          required: false
          description: >-
            Your own id for this request, echoed back and recorded on the audit
            trail. 1–128 characters from `A–Z a–z 0–9 . _ : -`, starting with a
            letter or digit; anything else is replaced by a generated id.
          schema:
            type: string
            maxLength: 128
        - name: Idempotency-Key
          in: header
          required: true
          description: >-
            Your key for this write: send the same key when you retry and the
            first result comes back instead of a second action. Keys are
            honoured for at least 24 hours. 1–200 visible ASCII characters.
            Replaces the `idempotency_key` body field, which still works until
            2026-12-31; this action needs a key on one of the two, and the
            header is the one to send.
          schema:
            type: string
            maxLength: 200
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                board_id:
                  type: string
                  minLength: 1
                  description: >-
                    The automation's board id (automations.list gives each
                    automation's board_id). Needed over the API: a call has no
                    open board to fall back on.
                version:
                  type: integer
                  exclusiveMinimum: 0
                  description: The draft version you last read or wrote.
                step_key:
                  type: string
                  minLength: 1
                  maxLength: 64
                  description: The key of the step to set up, as the sketch names it.
                tool:
                  type: string
                  minLength: 1
                  maxLength: 200
                  description: >-
                    The tool's registry name, exactly as the tool list gives it:
                    a platform tool by its own name (web.search), or a connected
                    app's or MCP server's tool as connector.<app>.<tool>
                    (connector.deepwiki.read_wiki_structure), never without its
                    connector. prefix.
                params:
                  description: >-
                    The tool's input, checked against its own schema. Any
                    setting, at any depth, reads the run's data with {{ … }}
                    around one CEL expression. A value that is exactly one {{ …
                    }} keeps its type (a number, a list, a map); with words
                    around it, it is text. What an expression reads: trigger
                    (what started the run: a webhook's body at
                    trigger.payload.<field>, an app event's fields at
                    trigger.event.payload.<field>); steps.<key> (an earlier
                    step's answer: a table read's rows at steps.<key>.rows, each
                    { row_id, values: { <column>: … } }; a think's at
                    steps.<key>.answer); json (the step just before); item and
                    index (inside a loop); run.id and run.contactId;
                    contact.consent.email and contact.consent.sms. Operators: +
                    - * / %, == != < <= > >=, && || !, cond ? a : b, x in list.
                    Functions, each called by its bare name: size(x). For text:
                    upper(s), lower(s), trim(s), replace(s, from, to),
                    substring(s, start, end), split(s, sep), join(list, sep),
                    s.contains(t), s.startsWith(t), test(s, re2), extract(s,
                    re2), format("%s of %s", [a, b]). For numbers: round(x),
                    round(x, 2), floor(x), ceil(x), abs(x), sum(list),
                    avg(list), min(list), max(list), int(x), double(x),
                    string(x). For lists: list.map(x, expr), list.filter(x,
                    cond), list.exists(x, cond), first(list), last(list),
                    sort(list), sortBy(list, "field"), unique(list), slice(list,
                    from, to). For maps: has(m.field), get(m, "a.b", default),
                    pick(m, keys), merge(a, b), keys(m), values(m). For dates:
                    now(), dateAdd(d, "P1D"), dateDiff(a, b, "day"),
                    dateFormat(d, "MMM d, h:mm a", "America/Chicago") (yyyy MM
                    dd HH mm, and a zone; UTC when none), startOf(d, "week"). A
                    value that may be missing:
                    coalesce(trigger.payload.nickname, "friend") gives a
                    default, and coalesce(trigger.payload.company, omit) leaves
                    that key out. Examples: "Booking {{
                    trigger.payload.booking_id }} for {{ trigger.payload.guests
                    }} guests"; { "open": "{{ size(steps.read_tasks.rows) }}" };
                    "{{ join(steps.read_tasks.rows.map(r, r.values.title), ', ')
                    }}". An expression that cannot be read, names a step that is
                    not before this one, or gives the wrong kind of value is
                    refused at save with its path and its fix.
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties: {}
                idempotency_key:
                  type: string
                  minLength: 1
                  maxLength: 200
                  description: >-
                    Deprecated on REST: send the `Idempotency-Key` header
                    instead. Still accepted until 2026-12-31; if both are sent
                    they must match.
                workspace:
                  description: >-
                    Which workspace to run in — its slug. Omit to use your
                    default. With more than one reachable workspace and no
                    default, the call is refused and the choices are listed.
                  type: string
                  minLength: 1
              required:
                - board_id
                - step_key
                - tool
                - version
              additionalProperties: false
      responses:
        '200':
          description: >-
            The call was admitted and dispatched. `ok` says whether the tool
            succeeded — a refusal the tool itself produced is still a 200,
            exactly as it is a successful JSON-RPC result over MCP.
          headers:
            x-goosy-api:
              description: Present while this API is in beta; the value is `beta`.
              schema:
                type: string
                const: beta
            x-request-id:
              description: >-
                This request's id: the `x-request-id` you sent when it was well
                formed, otherwise one generated for you. Quote it to support; it
                is recorded on every audit row the call wrote.
              schema:
                type: string
            RateLimit-Limit:
              description: Requests this key may make in a rolling minute.
              schema:
                type: integer
                minimum: 1
            RateLimit-Remaining:
              description: Requests left in the current rolling minute.
              schema:
                type: integer
                minimum: 0
            RateLimit-Reset:
              description: Whole seconds until the window frees more requests.
              schema:
                type: integer
                minimum: 1
            x-goosy-tool-error:
              description: >-
                `true` when a boundary step refused the call — workspace
                resolution failed or could not be read. A tool that ran and
                returned its own typed `ok: false` reports `false` here.
                **Branch on `ok` in the body for the outcome; this header is the
                transport-level hint.**
              schema:
                type: string
                enum:
                  - 'true'
                  - 'false'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    description: The tool ran and answered.
                    properties:
                      ok:
                        type: boolean
                        const: true
                      board_id:
                        type: string
                      version:
                        type: integer
                        exclusiveMinimum: 0
                      revision:
                        description: >-
                          The draft's revision, which moves with every change
                          while the version stays: pass it back with steps to
                          rewrite the draft.
                        type: integer
                        minimum: 0
                      name:
                        type: string
                      status:
                        type: string
                        const: draft
                      steps:
                        type: array
                        items:
                          type: object
                          properties:
                            key:
                              type: string
                            label:
                              type: string
                            kind:
                              type: string
                            description:
                              type: string
                            sketch:
                              type: boolean
                              const: true
                            implementation:
                              type: string
                            settings:
                              type: object
                              propertyNames:
                                type: string
                              additionalProperties: {}
                          required:
                            - key
                            - label
                            - kind
                          additionalProperties: false
                      edges:
                        description: >-
                          Which step leads to which, when drawn: a Branch's
                          arms, each with its when_label. Absent runs the steps
                          in order.
                        type: array
                        items:
                          type: object
                          properties:
                            from:
                              type: string
                            to:
                              type: string
                            conditional:
                              type: boolean
                              const: true
                            when_label:
                              type: string
                          required:
                            - from
                            - to
                          additionalProperties: false
                      trigger:
                        type: object
                        properties:
                          kind:
                            type: string
                          sketch:
                            type: boolean
                            const: true
                          settings:
                            type: object
                            propertyNames:
                              type: string
                            additionalProperties: {}
                        required:
                          - kind
                        additionalProperties: false
                      unbound_steps:
                        type: array
                        items:
                          type: string
                        description: The keys of the steps not set up yet.
                      waits_without_length:
                        description: >-
                          Set when a wait step's words state no length: which
                          waits, and to set a sensible length and say what was
                          chosen.
                        type: string
                      added_without_action:
                        description: >-
                          Set when an add op drew an action step with nothing
                          set up: which steps, and to write it as an email or
                          set what it does before saying it was added.
                        type: string
                      branch_arms_not_set:
                        description: >-
                          Set when a branch has paths with no rule yet: which,
                          and to set each with automations.bind_step before
                          saying the branch is done.
                        type: string
                      step:
                        type: object
                        properties:
                          key:
                            type: string
                          label:
                            type: string
                          kind:
                            type: string
                          description:
                            type: string
                          sketch:
                            type: boolean
                            const: true
                          implementation:
                            type: string
                          settings:
                            type: object
                            propertyNames:
                              type: string
                            additionalProperties: {}
                        required:
                          - key
                          - label
                          - kind
                        description: The Tool step as it is now set up.
                        additionalProperties: false
                      tool:
                        type: object
                        properties:
                          source:
                            type: string
                            enum:
                              - platform
                              - connection
                              - mcp
                          toolId:
                            type: string
                            minLength: 1
                            maxLength: 200
                          class:
                            type: string
                            enum:
                              - read
                              - write
                              - high-leverage
                          digest:
                            anyOf:
                              - type: string
                                minLength: 1
                                maxLength: 200
                              - type: 'null'
                        required:
                          - source
                          - toolId
                          - class
                          - digest
                        additionalProperties: false
                        description: >-
                          Where the tool comes from, its class (read, write or
                          high-leverage) and the tool-list version it was bound
                          to. A write or high-leverage tool is named on the
                          switch-on card.
                      replayed:
                        type: boolean
                        description: >-
                          True when this is the first result of an earlier call
                          with the same idempotency_key, returned without
                          writing anything again.
                      workspace:
                        type: string
                        description: The slug of the workspace this call ran in.
                      working_in:
                        type: object
                        properties:
                          label:
                            type: string
                            description: 'The chip words — e.g. "working in: Acme Main".'
                          note:
                            type: string
                            description: >-
                              Why this workspace — e.g. "your default", "this
                              call only".
                          workspace:
                            type: string
                            description: The resolved workspace's slug.
                          source:
                            type: string
                            enum:
                              - call-override
                              - key-pin
                              - stored-default
                              - sole-reachable
                            description: >-
                              Why this workspace was chosen: the call named it
                              (`call-override`), the key is pinned to it
                              (`key-pin`), it is your default
                              (`stored-default`), or it is the only one the key
                              reaches (`sole-reachable`).
                        required:
                          - label
                          - note
                          - workspace
                          - source
                        description: >-
                          Which workspace this call ran in, and how that was
                          decided. Present on every workspace-scoped result.
                        additionalProperties: false
                    required:
                      - ok
                      - board_id
                      - name
                      - replayed
                      - status
                      - step
                      - steps
                      - tool
                      - trigger
                      - unbound_steps
                      - version
                      - working_in
                      - workspace
                  - $ref: '#/components/schemas/ToolRefusal'
        '400':
          description: >-
            The request could not be used: the body is present but not a JSON
            object (`tenant_api.malformed_body`); it is a top-level array
            carrying more messages than this endpoint accepts
            (`tenant_mcp.batch_too_large`); or the `Idempotency-Key` header is
            malformed (`tenant_api.idempotency_key_invalid`), disagrees with the
            body's `idempotency_key` (`tenant_api.idempotency_key_conflict`), or
            was sent to an action that cannot replay a retry
            (`tenant_api.idempotency_unsupported`). Nothing ran.
          headers:
            x-goosy-api:
              description: Present while this API is in beta; the value is `beta`.
              schema:
                type: string
                const: beta
            x-request-id:
              description: >-
                This request's id: the `x-request-id` you sent when it was well
                formed, otherwise one generated for you. Quote it to support; it
                is recorded on every audit row the call wrote.
              schema:
                type: string
            Deprecation:
              description: >-
                RFC 9745: this refusal's nested `error` object is deprecated,
                since this instant (`@<unix seconds>`).
              schema:
                type: string
            Sunset:
              description: >-
                RFC 8594: the nested `error` object may be removed after this
                date (2026-12-31).
              schema:
                type: string
            Link:
              description: The page that says what to read instead (`rel="deprecation"`).
              schema:
                type: string
            RateLimit-Limit:
              description: Requests this key may make in a rolling minute.
              schema:
                type: integer
                minimum: 1
            RateLimit-Remaining:
              description: Requests left in the current rolling minute.
              schema:
                type: integer
                minimum: 0
            RateLimit-Reset:
              description: Whole seconds until the window frees more requests.
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: >-
            No bearer credential, or one that did not resolve. Deliberately ONE
            undifferentiated answer for absent / unknown / revoked / expired, so
            the endpoint is never an oracle over the key space.
          headers:
            x-goosy-api:
              description: Present while this API is in beta; the value is `beta`.
              schema:
                type: string
                const: beta
            x-request-id:
              description: >-
                This request's id: the `x-request-id` you sent when it was well
                formed, otherwise one generated for you. Quote it to support; it
                is recorded on every audit row the call wrote.
              schema:
                type: string
            Deprecation:
              description: >-
                RFC 9745: this refusal's nested `error` object is deprecated,
                since this instant (`@<unix seconds>`).
              schema:
                type: string
            Sunset:
              description: >-
                RFC 8594: the nested `error` object may be removed after this
                date (2026-12-31).
              schema:
                type: string
            Link:
              description: The page that says what to read instead (`rel="deprecation"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            The credential is good but the surface is not open to it — the
            platform or account API switch is off, or the holder lacks the
            `api.access` capability. The `code` says which.
          headers:
            x-goosy-api:
              description: Present while this API is in beta; the value is `beta`.
              schema:
                type: string
                const: beta
            x-request-id:
              description: >-
                This request's id: the `x-request-id` you sent when it was well
                formed, otherwise one generated for you. Quote it to support; it
                is recorded on every audit row the call wrote.
              schema:
                type: string
            Deprecation:
              description: >-
                RFC 9745: this refusal's nested `error` object is deprecated,
                since this instant (`@<unix seconds>`).
              schema:
                type: string
            Sunset:
              description: >-
                RFC 8594: the nested `error` object may be removed after this
                date (2026-12-31).
              schema:
                type: string
            Link:
              description: The page that says what to read instead (`rel="deprecation"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            No such tool. The body names no tool and is identical for every
            unrecognised name.
          headers:
            x-goosy-api:
              description: Present while this API is in beta; the value is `beta`.
              schema:
                type: string
                const: beta
            x-request-id:
              description: >-
                This request's id: the `x-request-id` you sent when it was well
                formed, otherwise one generated for you. Quote it to support; it
                is recorded on every audit row the call wrote.
              schema:
                type: string
            Deprecation:
              description: >-
                RFC 9745: this refusal's nested `error` object is deprecated,
                since this instant (`@<unix seconds>`).
              schema:
                type: string
            Sunset:
              description: >-
                RFC 8594: the nested `error` object may be removed after this
                date (2026-12-31).
              schema:
                type: string
            Link:
              description: The page that says what to read instead (`rel="deprecation"`).
              schema:
                type: string
            RateLimit-Limit:
              description: Requests this key may make in a rolling minute.
              schema:
                type: integer
                minimum: 1
            RateLimit-Remaining:
              description: Requests left in the current rolling minute.
              schema:
                type: integer
                minimum: 0
            RateLimit-Reset:
              description: Whole seconds until the window frees more requests.
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: >-
            Over this key's per-minute cap. Carries `Retry-After` and
            `error.retry_after_seconds`.
          headers:
            x-goosy-api:
              description: Present while this API is in beta; the value is `beta`.
              schema:
                type: string
                const: beta
            x-request-id:
              description: >-
                This request's id: the `x-request-id` you sent when it was well
                formed, otherwise one generated for you. Quote it to support; it
                is recorded on every audit row the call wrote.
              schema:
                type: string
            Deprecation:
              description: >-
                RFC 9745: this refusal's nested `error` object is deprecated,
                since this instant (`@<unix seconds>`).
              schema:
                type: string
            Sunset:
              description: >-
                RFC 8594: the nested `error` object may be removed after this
                date (2026-12-31).
              schema:
                type: string
            Link:
              description: The page that says what to read instead (`rel="deprecation"`).
              schema:
                type: string
            RateLimit-Limit:
              description: Requests this key may make in a rolling minute.
              schema:
                type: integer
                minimum: 1
            RateLimit-Remaining:
              description: Requests left in the current rolling minute.
              schema:
                type: integer
                minimum: 0
            RateLimit-Reset:
              description: Whole seconds until the window frees more requests.
              schema:
                type: integer
                minimum: 1
            Retry-After:
              description: Whole seconds to wait before retrying.
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ToolRefusal:
      type: object
      properties:
        ok:
          type: boolean
          const: false
        code:
          type: string
          description: >-
            The typed reason — e.g. `workspace_ambiguous`, `invalid_arguments`,
            or the tool's own failure code.
        message:
          type: string
          description: A sentence a person can act on.
        workspaces:
          description: 'On a workspace refusal: the slugs this key may pass as `workspace`.'
          type: array
          items:
            type: string
        issues:
          description: 'On `invalid_arguments`: which fields failed, and why.'
          type: array
          items:
            type: object
            properties:
              path:
                type: string
              message:
                type: string
            required:
              - path
              - message
            additionalProperties: false
        path:
          description: >-
            On an authoring refusal: where in your call's input it points, e.g.
            `steps.<key>.params.<field>`.
          type: string
        fix:
          description: 'On an authoring refusal: the change to your call that would pass.'
          type: string
        instruction:
          description: 'On an authoring refusal: what to do next with it.'
          type: string
      required:
        - ok
        - code
        - message
      description: A call that was admitted and dispatched, and did not succeed.
      additionalProperties: false
    Error:
      type: object
      properties:
        ok:
          type: boolean
          const: false
        code:
          type: string
          description: >-
            The typed refusal code — e.g. `tenant_mcp.rate_limited`,
            `tenant_api.unknown_tool`.
        message:
          type: string
          description: A sentence a person can act on.
        retry_after_seconds:
          description: 'On a 429: whole seconds to wait. Mirrors `Retry-After`.'
          type: number
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            retry_after_seconds:
              type: number
          required:
            - code
            - message
          description: >-
            Deprecated: the same values as the top-level fields, kept until
            2026-12-31. Read `code` and `message` at the top level.
          additionalProperties: false
      required:
        - ok
        - code
        - message
        - error
      description: >-
        A request the boundary refused before dispatching anything. The same
        shape the MCP endpoint answers its own refusals with, and the same
        top-level fields a dispatched call's refusal carries, so one client
        branch covers both.
      additionalProperties: false
  securitySchemes:
    tenantApiKey:
      type: http
      scheme: bearer
      description: >-
        An API key minted at Settings › API & MCP. Send it as `Authorization:
        Bearer <key>`. A key carries its holder's own permissions, resolved on
        every call — revoking a membership closes the key's reach immediately.
        Keep it in an environment variable (`GOOSY_API_KEY`), never in a
        committed file.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.