Skip to main content
Glama

register_code_artifact

Save reusable code artifacts like scripts or functions with metadata for reproducibility. Link code to projects and add tags, parameters, and dependencies to enable future reuse and reconstruction.

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

TableJSON Schema
NameRequiredDescriptionDefault
titleYes
codeYes
languageNo
project_idNo
kindNoscript
purposeNo
tagsNo
file_pathNo
packagesNo
paramsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden but does not disclose behavioral traits such as overwrite behavior, authentication needs, rate limits, or side effects. It also does not describe the output or return value.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise with two paragraphs: the first states purpose and usage, the second lists parameters. It is front-loaded and every sentence adds value, with no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description provides parameter details but lacks information about the output (despite having an output schema), error cases, or prerequisites. For a 10-parameter tool with no annotations, it is somewhat complete but leaves gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description compensates by providing a clear block with explanations for each parameter (e.g., 'title: Short descriptive name'). This adds significant meaning beyond the schema's types and defaults.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Save' and the resource 'Code Repository', and lists the kinds of code artifacts (script, snippet, function, template). This distinguishes it from sibling tools like search_code_repository.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says 'Use this whenever the user writes or shares code worth reusing', providing clear when-to-use guidance. It does not mention alternatives or exclusions, but the context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SVerITG/Metis_PH'

If you have feedback or need assistance with the MCP directory API, please join our Discord server