import_tasks
Imports a BATCH of tasks from an external system (Linear, Jira, Spec Kit…) in the PIVOT FORMAT (resource orggen://import/pivot). Two inputs: items in the pivot format (source required) — extraction and mapping are then YOUR job — OR the format of a framework (values of the enumeration; mapping in the resource) + text = its file pasted as is, which the product reads without you; cellId/cellRef then file everything under one block, and an unrecognized text is REFUSED instead of being imported empty. OrgGen guarantees in both cases: (1) a REPLAY never duplicates — the key is (source, externalId); (2) dryRun is TRUE by default: the call returns the plan (created / updated / skipped / conflicts / errors), which you can show to the human, without writing anything; writing is a second call with dryRun: false; (3) a batch is rolled back as a whole (rollback_import); (4) the historical doneAt date of done tasks is kept. onExisting: "update" rewrites the supplied fields of an already imported task ONLY if nobody has modified it since — otherwise conflicts is reported instead of an overwrite (except an edit that arrives DURING the call, between the plan and the write: not detected). A dependency list that REMOVES a dependency on an ARCHIVED task that was not done and not lifted is a conflicts entry of reason dependency-removal-refused (with refusedRemovals and suggestedDependsOn): NOTHING of that task is written; a list sent back unchanged is never refused. Up to 500 items per call. Two kinds of refusal: a PLAN refusal is per item (details.errors: that item writes nothing, nor do the items that reference it, the rest is imported); a SCHEMA refusal (a field that breaks the format, dryRun included) refuses the WHOLE call, designates the line as items[i] and writes nothing. An item may carry an arbitrage (a question and its options): it is created OPEN and addressed to nobody, and a replay leaves it as it is (details.arbitrages). A link to another task is a label lie:<externalId> or doublon-de:<externalId>, by identifier (a broken one is declared in details.brokenLinks, and its item is still imported). No assignment notification is sent. Source comments have no slot: they are concatenated into body. Assignees are labels resolved against the people of the project, otherwise kept as they are (unresolvedAssignees). Leaves ONE aggregated event in the activity log per call that wrote (import.applied: the number of tasks created and updated), not one line per task; list_imports remains the history of the BATCH. An imported task has no observed creation or claim. For each update or conflict the plan returns the before → after values of each field (fields, truncated values); notTransported says what the format that was read does not carry. In the validation work mode (get_config, key task.workflow), the UPDATE of an already existing task follows the rule of an agent: a done is CONVERTED to "to validate" (heldForValidation + heldForValidationNote) and an update that would remove a reserved label, a dependency on a task that is waiting, or would touch a task to approve is removed from the plan and NAMED in refusedByTransition. A history CREATION (doneAt) remains allowed.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "import_tasks"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | With a `format` other than `pivot`: the content of the file, as is (at most 400000 characters). An unrecognized text is REFUSED instead of being imported empty. | |
| items | No | The tasks in the PIVOT FORMAT (resource `orggen://import/pivot`) — with `format: "pivot"` (the default). An invalid item writes nothing; neither do the items that reference it (parent, dependency). | |
| cellId | No | With `text`: the block under which to file ALL the tasks read (e.g. the feature). Mutually exclusive with `cellRef`. | |
| dryRun | No | Default TRUE: computes and returns the plan WITHOUT writing anything. `false` to write. | |
| format | No | Default `pivot`: you supply `items`. Any other format reads the file of a framework PASTED AS IS into `text` (mapping, identity and limits: resource `orggen://import/pivot`). | |
| source | No | The originating system (e.g. "linear"). REQUIRED with `items`; with a text `format`, defaults to the format's own (e.g. "speckit"). Enters the derived identifier "<source>-<externalId>". | |
| cellRef | No | With `text`: the NAME of the block under which to file all the tasks read (ambiguous or not found = named refusal). Mutually exclusive with `cellId`. | |
| importId | No | Identifier of the batch; generated by the product if omitted. | |
| onExisting | No | Default `skip`: an already imported task is left as it is. `update`: rewrites the SUPPLIED fields, only if nobody has modified it since the import (otherwise `conflicts`). | |
| expectedProjectId | No | UUID of the project THIS call targets (overrides the session project). |