> For the complete documentation index, see [llms.txt](https://docs.neuroinfodb.org/squirrel/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.neuroinfodb.org/squirrel/specifications/specification-v1.0/package.md). Agents can also search and read this documentation through its [MCP server](https://docs.neuroinfodb.org/squirrel/~gitbook/mcp).

# package

JSON object

This object contains information about the squirrel package.

<figure><img src="https://mermaid.ink/img/pako:eNqVlEFrgzAUx7-KpDgKOsrwFwc9bZcxNlhvw8uredasaiSJW6X0uy9RY6vtofVg3j_5_fOS99ADSTlFEpOtgDp33r-SytGP4Fx5b-vPjy7yw3BFQYFnXv7zCdHzNaQ72KI3jPNVVmPBKpTeGM0I3NcoWImVkt5ZPKNM4pCyVDFegWi9mfZ7uJsNV1vBmxoqKFqpE3fKsdLuO6Cy2fxgqlPbwK5bbRjVUKY3GsYrBN9IFL9gDiO9c3GFZZXSy_qKHTxRI90nMql1OUzmbrhc7i_FpGcDi7hubwkfTIMElDJjhemRCS10iZqiGFBOGu26Z30x2En28Ek73YRvfWPPu3MMovdYNXPYixiDjXuDVRPDeAXVFuiMxzdMES-yLAt0tQTfYUhB5iAEtPHj1DTJco9xVoV7rJNS3GKc2ceO3uK1nu7zHA34tFwGvSVeRFE0xOEfoyqPo3pPAlKiKIFR_XM4mK0SonIsMSGxDilm0BQqIUl11GhT6-LjK2WKCxJnUEgMCDSKr9sqJbESDVrohYH-15Qjpb_Ub86tPv4DUcmRwA?type=png" alt=""><figcaption></figcaption></figure>

### JSON variables

:blue\_circle: Primary key\
:red\_circle: Required\
:yellow\_circle: Computed (squirrel writer/reader should handle these variables)

<table data-full-width="true"><thead><tr><th width="274" align="right">Variable</th><th width="128">Type</th><th width="119">Default</th><th>Description</th></tr></thead><tbody><tr><td align="right"><code>Changes</code></td><td>string</td><td></td><td>Any CHANGE files.</td></tr><tr><td align="right"><code>DataFormat</code></td><td>string</td><td><code>orig</code></td><td>Data format for imaging data to be written. Squirrel should attempt to convert to the specified format if possible. <code>orig</code>, <code>anon</code>, <code>anonfull</code>, <code>nifti3d</code>, <code>nifti3dgz</code>, <code>nifti4d</code>, <code>nifti4dgz</code> (<strong>see details below</strong>).</td></tr><tr><td align="right"><code>Datetime</code></td><td>datetime</td><td><span data-gb-custom-inline data-tag="emoji" data-code="1f534">🔴</span> <span data-gb-custom-inline data-tag="emoji" data-code="1f7e1">🟡</span></td><td>Datetime the package was written. Set by the squirrel library each time the package is written.</td></tr><tr><td align="right"><code>Description</code></td><td>string</td><td></td><td>Longer description of the package.</td></tr><tr><td align="right"><code>License</code></td><td>string</td><td></td><td>Any sharing or license notes, or LICENSE files.</td></tr><tr><td align="right"><code>Notes</code></td><td>string</td><td></td><td>JSON-formatted string of notes about the package (<strong>see details below</strong>).</td></tr><tr><td align="right"><code>PackageFormat</code></td><td>string</td><td><code>squirrel</code></td><td>Always <code>squirrel</code>.</td></tr><tr><td align="right"><code>PackageName</code></td><td>string</td><td><span data-gb-custom-inline data-tag="emoji" data-code="1f534">🔴</span> <span data-gb-custom-inline data-tag="emoji" data-code="1f535">🔵</span></td><td>Short name of the package.</td></tr><tr><td align="right"><code>Readme</code></td><td>string</td><td></td><td>Any README files.</td></tr><tr><td align="right"><code>SeriesDirectoryFormat</code></td><td>string</td><td><code>orig</code></td><td><code>orig</code>, <code>seq</code> (<strong>see details below</strong>).</td></tr><tr><td align="right"><code>SquirrelBuild</code></td><td>string</td><td><span data-gb-custom-inline data-tag="emoji" data-code="1f7e1">🟡</span></td><td>Build version of the squirrel library and utilities which wrote the package.</td></tr><tr><td align="right"><code>SquirrelVersion</code></td><td>string</td><td><span data-gb-custom-inline data-tag="emoji" data-code="1f7e1">🟡</span></td><td>Squirrel format version.</td></tr><tr><td align="right"><code>StudyDirectoryFormat</code></td><td>string</td><td><code>orig</code></td><td><code>orig</code>, <code>seq</code> (<strong>see details below</strong>).</td></tr><tr><td align="right"><code>SubjectDirectoryFormat</code></td><td>string</td><td><code>orig</code></td><td><code>orig</code>, <code>seq</code> (<strong>see details below</strong>).</td></tr></tbody></table>

### Variable options

#### SubjectDirectoryFormat, StudyDirectoryFormat, SeriesDirectoryFormat

* `orig` - Original subject, study, series directory structure format. Example `S1234ABC/1/1`
* `seq` - Sequential. Zero-padded sequential numbers. Example `00001/0001/00001`

#### DataFormat

* `orig` - Original, raw data format. If the original format was DICOM, the output format should be DICOM. See [DICOM anonymization levels](https://docs.neuroinfodb.org/squirrel/specifications/dicom-anonymization.md) for details.
* `anon` - If original format is DICOM, write anonymized DICOM, removing most PHI, except dates. See [DICOM anonymization levels](https://docs.neuroinfodb.org/squirrel/specifications/dicom-anonymization.md) for details.
* `anonfull` - If original format is DICOM, the files will be fully anonymized, by removing dates, times, locations in addition to PHI. See [DICOM anonymization levels](https://docs.neuroinfodb.org/squirrel/specifications/dicom-anonymization.md) for details.
* `nifti3d` - Nifti 3D format
  * Example `file001.nii`, `file002.nii`, `file003.nii`
* `nifti3dgz` - gzipped Nifti 3D format
  * Example `file001.nii.gz`, `file002.nii.gz`, `file003.nii.gz`
* `nifti4d` - Nifti 4D format
  * Example `file.nii`
* `nifti4dgz` - gzipped Nifti 4D format
  * Example `file.nii.gz`

#### Notes

Notes about the package are stored here. This includes import and export logs, and notes from imported files. The value is a string containing JSON; it is generally freeform, but notes can be divided into sections.

<table><thead><tr><th width="163">Section</th><th>Description</th></tr></thead><tbody><tr><td><code>bids</code></td><td>Written by the BIDS importer. Contains <code>dataset_description.json</code> fields with no package variable (<code>BIDSVersion</code>, <code>Authors</code>, <code>DatasetDOI</code>, <code>Funding</code>, <code>GeneratedBy</code>, ...), <code>files</code> (other dataset-level files such as <code>LICENSE</code> and <code>participants.json</code>), <code>phenotype</code> (column descriptions for each phenotype instrument), and <code>import</code> (files that had no content, eg DataLad files not yet fetched). BIDS <code>README</code> and <code>CHANGES</code> are stored in <code>Readme</code> and <code>Changes</code>.</td></tr><tr><td><code>import</code></td><td>Any notes related to import.</td></tr><tr><td><code>merge</code></td><td>Any notes related to the merging of datasets. Such as information about renumbering of subject IDs</td></tr><tr><td><code>export</code></td><td>Any notes related to the export process</td></tr></tbody></table>

### Directory structure

Files associated with this section are stored in the following directory

> `/`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.neuroinfodb.org/squirrel/specifications/specification-v1.0/package.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
