register_code_artifact
Save scripts, snippets, functions, or templates to the code repository for reuse. Capture code along with dependencies, parameters, and context to ensure reproducibility.
Instructions
Save a script, snippet, reusable function or template to the Code Repository.
Use this whenever the user writes or shares code worth reusing, so it can be
found and rebuilt later. Capture as much reproducibility context as you can.
Args:
title: Short descriptive name (e.g. "INLA BYM2 spatial model setup").
code: The actual code.
language: r | python | sql | stata | shell | … (lowercase).
project_id: The project this belongs to (links it for reuse). Optional.
kind: script | snippet | function | template.
purpose: One line on what it does / when to use it.
tags: Comma-separated tags (e.g. "spatial,INLA,mapping").
file_path: Where the script lives on disk, if any.
packages: Dependencies / environment (e.g. "INLA 24.9, sf, dplyr").
params: Seeds, thresholds, hyperparameters used (for exact reproduction).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | ||
| code | Yes | ||
| language | No | ||
| project_id | No | ||
| kind | No | script | |
| purpose | No | ||
| tags | No | ||
| file_path | No | ||
| packages | No | ||
| params | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |