Skip to main content
Glama

harvest_code

Admit reusable, tested code from a completed task into the AssetRAG library without blocking work; failures are reported or queued.

Instructions

Admit reusable, tested code from a finished task into the library. Never blocks the task: failures are reported/queued.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "paths": "<paths>",
      "project_dir": "<project_dir>",
      "name": "<name>",
      "description": "<description>"
    },
    "name": "harvest_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
tagsNo
pathsYes
testsNo
categoryNobackend
own_codeNo
descriptionYes
project_dirYes
task_completeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations at all, the description carries the full burden, and it does disclose one important trait: the call never blocks the task and failures are reported or queued rather than raised. That is genuinely useful context. It says nothing about permission requirements, duplicate-name handling, or whether existing library entries can be overwritten, which matters for a mutation tool.

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

Conciseness4/5

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

Two tight sentences, front-loaded with the action, followed by a behavioral guarantee. Nothing is padded or redundant. It is arguably too terse given the parameter surface, but the wording itself earns its place.

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

Completeness2/5

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

A nine-parameter mutation tool with no annotations, no output schema, and no parameter documentation is under-described by two sentences. An agent can grasp the intent but cannot confidently supply the required paths, project_dir, name, or description, nor predict what the queued-failure outcome looks like.

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

Parameters2/5

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

Nine parameters with 0% schema description coverage and the description explains none of them. Only weak hints exist: 'tested' gestures at the tests parameter and 'finished task' at task_complete, but paths, project_dir, name, description, tags, category, and own_code are left entirely undefined.

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

Purpose4/5

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

The description gives a specific verb and object: admit reusable, tested code from a finished task into a library. That distinguishes it reasonably well from read/inspect siblings like scan_code or repo_map, though it does not explicitly contrast with the write-oriented import_asset.

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

Usage Guidelines3/5

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

The phrase 'from a finished task' implies the triggering condition (the work must be complete and tested), which is real usage guidance. However, there is no explicit statement of when not to use it, no prerequisite checks, and no named alternative when the code is not reusable or untested.

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