# system.kanoa.tooling.addTool(toolInfo, userId)

Adds a tool: an isTooling asset (never OEE-enabled) with its tooling info and life counter rows. Tool names are unique within a site (the site its location is under; tools outside any site are a group of their own), because a tag mounts a tool by name.

---

### Parameters

**toolInfo** `Dictionary`<br />
<table class='dictionaryKeyTable'>
 <tbody>
  <tr><td> - assetName</td><td>String</td><td>Required</td></tr>
  <tr><td> - assetTypeId</td><td>Integer</td><td>Required. Any asset type; there's no seeded tooling type</td></tr>
  <tr><td> - parentId</td><td>Integer</td><td>Where the tool is stored in the asset tree (a storage bin, say)</td></tr>
  <tr><td> - enabled</td><td>Boolean</td><td>Defaults to True</td></tr>
  <tr><td> - sortOrder</td><td>Integer</td><td></td></tr>
  <tr><td> - hasPositions, holdsInserts, scalesOutput</td><td>Boolean</td><td>What the tool does. Default False</td></tr>
  <tr><td> - lifeUnit</td><td>String</td><td>'cycles', 'runMinutes' or 'calendarDays'. The limits below are read in this unit</td></tr>
  <tr><td> - lifetimeLimit, pmInterval, refurbInterval</td><td>Integer</td><td>None = no limit</td></tr>
  <tr><td> - refurbLimit</td><td>Integer</td><td>Refurbishments before the tool is worn out</td></tr>
  <tr><td> - warnPct</td><td>Float</td><td>Percent of a limit at which the tool comes due</td></tr>
  <tr><td> - calibrationIntervalDays</td><td>Integer</td><td></td></tr>
  <tr><td> - calibrationDue</td><td>Date</td><td></td></tr>
  <tr><td> - setupMinutes, teardownMinutes</td><td>Integer</td><td></td></tr>
 </tbody>
</table>

**userId** `Integer`: The user making the change<br />

---

### Returns

**(toolingAssetId, message)**<br />

---

### Example

```python
toolInfo = {'assetName': 'assetName', 'assetTypeId': 1, 'parentId': 1, 'enabled': True, 'sortOrder': 1}
userId = 5
toolingAssetId, message = system.kanoa.tooling.addTool(toolInfo, userId)
```
