# CommCare

CommCare is a mobile data collection and case management platform for health and social programs

- **Category:** forms & surveys
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 6
- **Triggers:** 0
- **Slug:** `COMMCARE`
- **Version:** 20260312_00

## Tools

### Create Lookup Table

**Slug:** `COMMCARE_CREATE_LOOKUP_TABLE`

Tool to create a new lookup table in a CommCare domain. Use when you need to set up reference data structures like product catalogs, price lists, or configuration tables. Requires 'Edit Apps' permission.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `tag` | string | Yes | The name/identifier of the lookup table. This is used to reference the table in applications. |
| `domain` | string | Yes | The CommCare domain/project identifier where the lookup table will be created. |
| `fields` | array | Yes | Array of field definitions for the lookup table. Each field must have a field_name and optional properties array. |
| `is_global` | boolean | No | Indicates whether the lookup table is accessible to all users in the domain. Defaults to false if not specified. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Web User Invitation

**Slug:** `COMMCARE_CREATE_WEB_USER_INVITATION`

Tool to create an invitation for a new web user in CommCare. Use when you need to invite a user with specific role and permissions. Requires 'Edit Web Users & Edit Access API' permissions.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `role` | string | Yes | Role designation for the user (e.g., 'App Editor', 'Admin') |
| `email` | string | Yes | Email address of the user to invite |
| `domain` | string | Yes | CommCare domain name where the invitation will be created |
| `profile` | string | No | Profile to assign to the user |
| `user_data` | object | No | Custom data fields associated with the user |
| `tableau_role` | string | No | Tableau role (Explorer, ExplorerCanPublish, SiteAdministratorExplorer, Viewer, Unlicensed) |
| `tableau_groups` | array | No | List of Tableau groups for user assignment |
| `primary_location_id` | string | No | Location ID for primary assignment (must be in assigned locations) |
| `assigned_location_ids` | array | No | List of location IDs the web user will access |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Reports

**Slug:** `COMMCARE_LIST_REPORTS`

Tool to retrieve available reports configured in a CommCare project. Use when you need to discover what reports exist before downloading report data via the Download Report Data API.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `project` | string | Yes | The CommCare project identifier. This is the project space name where reports are configured. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Single Sign On

**Slug:** `COMMCARE_SINGLE_SIGN_ON`

Tool to validate login credentials and retrieve user profile for a mobile worker or web user. Use when you need to authenticate a user and obtain their profile information including roles, permissions, locations, and configuration details.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `domain` | string | Yes | The CommCare domain/project identifier where the user account exists. |
| `password` | string | Yes | The user's authentication password for login validation. |
| `username` | string | Yes | The user's login identifier (mobile worker or web user username). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Submit Form ODK Compatible

**Slug:** `COMMCARE_SUBMIT_FORM_ODK_COMPATIBLE`

Tool to submit form data using ODK-compatible endpoint for Android client compatibility. Use when submitting XForm data to CommCare. Requires properly formatted XML with metadata including unique instanceID.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `domain` | string | Yes | The CommCare project domain name where the form will be submitted. |
| `xml_form_data` | string | Yes | Complete XForm XML data as a string. Must include root <data> element with xmlns, name, and version attributes. Must contain an n1:meta node with required fields: deviceID, timeStart (ISO 8601), timeEnd (ISO 8601), username, userID (UUID), and instanceID (UUID4, must be unique). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Submit Form to Application

**Slug:** `COMMCARE_SUBMIT_FORM_TO_APP`

Tool to submit an XForm to a specific CommCare application. Use when you need to submit form data and tag it with a specific application ID. The form is submitted as XML following the OpenRosa standard with required metadata fields.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `domain` | string | Yes | The CommCare project domain/space where the form will be submitted. |
| `form_xml` | string | Yes | Complete XForm XML content following OpenRosa standard. Must include root <data> element with xmlns, name, and version attributes. Must contain a <meta> section with required fields: deviceID, timeStart (ISO 8601 format), timeEnd (ISO 8601 format), username, userID, and instanceID (must be a unique UUID4 in format 'uuid:...' or just the UUID). |
| `application_id` | string | Yes | Application ID to tag the form submission with. This associates the submission with a specific CommCare application. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
