> For the complete documentation index, see [llms.txt](https://docs.autommate.com/userguide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.autommate.com/userguide/mcp-and-ai-reference/deployment-input-resolution.md).

# Resolve deployment inputs from verified context

A deployment connects a reusable Service to tenant connections and request data. Before asking for a value, inspect existing context. Never guess credentials, identifiers or business decisions.

**Scope:** Tool behavior comes from Autom Mate New declarations observed on **21 October 2026**. Source selection is recommended agent behavior, not automatic server resolution. Object/array transfer and the complete service lifecycle require runtime verification.

## 1. Read the actual target and contract

Use `services_search` / `services_get` for the blueprint, lane IDs and pinned versions. Use `work_items_search` for published Work Item contracts and `binding_inputs` where returned.

For an existing deployment, `deployments_get.checklist_items[].inputs[]` identifies lane items, inputs and unresolved configuration. Respect its tenant and environment. Do not infer requirements from labels.

Separate four categories:

| Category             | Typical source                                                                                |
| -------------------- | --------------------------------------------------------------------------------------------- |
| Request data         | Engage payload, such as the requested record identifier                                       |
| Computed data        | Earlier Work Item output, such as a newly created target ID                                   |
| Tenant configuration | Approved customer-specific mapping, configured value or appropriately scoped global reference |
| Credential           | A stored connection selected or confirmed under the tool's current rules                      |

Exposing a variable as a Work Item input makes it part of deployment configuration. Avoid creating redundant manual fields for data already produced by the service.

## 2. Resolve before asking

Record each field's expected type, source, scope, provenance and unresolved reason. This is an agent artifact, not an API schema.

Evaluate these sources in order, subject to semantic and type compatibility:

1. **Explicit instruction for this task.** Use a concrete value or mapping the user supplied for the current scope.
2. **Existing approved binding.** Preserve it unless a change was requested. A redacted value remains unknown to the agent; it is not empty.
3. **Engage payload.** Bind request-specific data from an actual documented payload field rather than freezing it as a deployment constant.
4. **Earlier Work Item output.** Use the real output contract and the producing lane item. Confirm execution order and conditional availability.
5. **Authorized source lookup or tenant configuration.** Read the appropriate native application action or configured source; retain its identifier and scope. A matching label alone is insufficient.
6. **Declared default.** Use it only when the contract and requested behavior make it appropriate; distinguish a typed default from a serialized example.
7. **Focused question.** Ask only when a required value remains missing, competing matches remain, or a business/authorization decision is needed.

Do not silently override explicit decisions. Report source conflicts and group questions that context cannot resolve.

## 3. Map using declared segment kinds

The observed `deployments_create` and `deployments_update_draft` contracts describe bindings as **laneItemId → inputId → segments**. Obtain IDs from actual read results. The following shapes summarize declarations; placeholders are not runnable identifiers.

| Kind             | Declared shape and use                                                                                      |
| ---------------- | ----------------------------------------------------------------------------------------------------------- |
| Text             | `{kind: "text", value: ...}` — known literal                                                                |
| Engage           | `{kind: "engage", ref: ...}` — actual payload path                                                          |
| Output           | `{kind: "output", workItemId: ..., path: ...}` — earlier lane item and output field                         |
| Credential       | `{kind: "credential", ref: ..., name: ...}` — selected App Connector credential                             |
| Vault credential | `{kind: "vaultCredential", credentialId: ..., attributeId: ...}` — supported credential attribute reference |
| Global           | `{kind: "global", ref: ...}` — correctly scoped shared-value reference                                      |
| Drive            | `{kind: "drive", path: ..., name: ...}` — supported drive reference                                         |
| Fields           | `{kind: "fields", value: {"<path>": {segments: [...]}}}` — nested mappings for `extras_*` inputs            |

Use the target build's accepted Engage path syntax. The current declaration text and example use different-looking path conventions; do not invent a universal prefix. Validate the chosen mapping in preview and inspect the resolved value in a controlled test.

When resending bindings, preserve `__deploymentScope.itemIds` where present. Do not include out-of-scope Work Items merely to make their missing inputs disappear.

## 4. Preserve tenant and credential decisions

The inspected deployment tools require tenant selection/confirmation through `deployments_list_tenants`. For each in-scope App Connector input, use `deployments_list_credentials` with the deployment tenant and application. The user selects or confirms the credential, including when one option exists. Keep an already bound credential unless a change is requested.

The agent may retain an explicit valid choice from the current task; it must not substitute another tenant's credential or invent permission. Follow the active tool instruction if it requires fresh confirmation. Present a consolidated preview of tenant, environment, Mate Agent, credentials and changes.

Test credentials in authoring and runtime App Connector bindings have different roles. `library_get_action` and `automs_get_flow` describe that distinction. Do not place secrets in prompts, exported examples or logs.

## 5. Handle redaction and type boundaries

`deployments_get` redacts text, drive and fields values. `deployments_update_draft` replaces the stored binding set. **Do not resend redaction markers, omit existing inputs or assume a partial patch.** If the complete required values cannot be reconstructed from authorized retained context, stop that update and state the exact preservation gap. An opaque preserve-existing-binding or patch capability would require a product change; it is not established by these declarations.

The existing [MSP deployment guide](https://docs.autommate.com/userguide/service-automation/deploy-a-service-to-msp-tenants) documents scalar output transfer and string composition. Selecting several variables in one field is not a general Object/Data Table merge. Use the declared type and nested key; do not stringify objects to silence validation.

Test Object, array, boolean, number, null, missing versus empty, nested path and multi-segment behavior separately where needed. The producer's actual Stop body supplies runtime output; Example response only describes its shape.

## 6. Verify the binding, not only the status

After an authorized save, read back the target package, pinned versions and scope. In a controlled execution, inspect the consuming Work Item's resolved input and the resulting Case context. A completed Case with null, UNBOUND or a value from another tenant does not verify the mapping.

Record the expected value, source, observed value and evidence. Keep **configuration validated**, **runtime transfer verified** and **external outcome verified** separate.

Related: [Build with an AI assistant](https://docs.autommate.com/userguide/mcp-and-ai-reference/build-with-an-ai-assistant), [input contracts](https://docs.autommate.com/userguide/mcp-and-ai-reference/read-hyperflow-and-action-input-contracts), [capability scope](https://docs.autommate.com/userguide/mcp-and-ai-reference/capabilities-and-version-scope).

## Use the same mapping for a manual deployment

This resolution procedure also applies when an operator uses the deployment UI. The assistant can prepare the blueprint and a mapping table without automatically deploying it. Distinguish configuration-time tenant settings from request-time inputs: an approval record ID, employee ID or amount may come from Engage or an earlier lookup instead of a literal entered for every deployment.

A caller-supplied “authorized: true” field is not independent authorization evidence. Verify the actual decision from the configured authority before the restricted action. If selecting an Execute item requires a matching Prove item, include that pairing in the manual checklist unless the installed product explicitly enforces it.
