Skip to main content
Glama

optimize_sequence

Run the DnaChisel optimizer over the subject with real constraints/objectives (GC window, pattern avoidance, translation enforcement, …). Emits the optimized sequence as a NEW record for downstream nodes.

Input Schema

NameRequiredDescriptionDefault
seedNobase seed for the alternatives — the same seed returns the same set. Advanced.
_filesNoThe project: record references shaped like _subject. Their records become library documents a tool names in sequences/parts/document; a trace or alignment is found by file name.
_subjectNoThe record to act on: exactly one of sequence, accession (+source), sample (an id from list_samples) or file ({name, text} or {name, base64}); record_index picks one record of several.
candidatesNohow many alternative solutions to produce (1 = a single solve). Candidate 1 is the plain unseeded answer; the rest run at seed+1, seed+2, …, so a listed alternative can be asked for again. Max 12.
objectivesNoDnaChisel objective specs — soft goals the solver maximises. Same `kind` values as constraints: EnforceTranslation, AvoidPattern, EnforceGCContent, AvoidHairpins, AvoidRareCodons, UniquifyAllKmers, CodonOptimize, EnforceSequence, AvoidChanges, EnforceChoice, EnforcePatternOccurence, AvoidStopCodons, EnforceMeltingTemperature, EnforceChanges, EnforceTerminalGCContent, SequenceLengthBounds, EnforceRbsStrength, AvoidHeterodimerization, AllowPrimer, EnforceRegionsCompatibility, AvoidMatches, AvoidBlastMatches.
constraintsNoDnaChisel constraint specs, e.g. [{"kind":"EnforceGCContent","mini":0.4,"maxi":0.6,"window":50}] — hard requirements the solution must satisfy. Valid `kind` values: EnforceTranslation, AvoidPattern, EnforceGCContent, AvoidHairpins, AvoidRareCodons, UniquifyAllKmers, CodonOptimize, EnforceSequence, AvoidChanges, EnforceChoice, EnforcePatternOccurence, AvoidStopCodons, EnforceMeltingTemperature, EnforceChanges, EnforceTerminalGCContent, SequenceLengthBounds, EnforceRbsStrength, AvoidHeterodimerization, AllowPrimer, EnforceRegionsCompatibility, AvoidMatches, AvoidBlastMatches.
randomization_thresholdNoDnaChisel `randomization_threshold` (default 10000). LOWER it to force the stochastic search: an objective-driven problem is deterministic, so without this every candidate comes back identical. Advanced.

Output Schema

NameRequiredDescriptionDefault
nEditsYesnucleotides changed
recordYesthe optimized sequence as a record
gcAfterYesGC fraction after optimization
successYesall hard constraints satisfied
caiAfterYesCAI after optimization, or null when not computable (no codon table to score against): a 0 would read as the worst possible adaptation
distinctYeshow many of the candidates are DIFFERENT sequences — 1 means the problem has a single answer, not that the run failed. The engine omits it for a single-candidate run, where it is 1 by definition
sequenceYesthe optimized sequence
gcProfileYeswindowed GC before and after, at each window's centre: the stretches the solver moved, which the two whole-sequence GC numbers average away
candidatesYesevery alternative solution: its seed, sequence, edit count, GC and CAI — compare them before choosing. Empty unless `candidates` asks for more than one

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / gcProfile
      Added value: +{
      +  "description": "windowed GC before and after, at each window's centre: the stretches the solver moved, which the two whole-sequence GC numbers average away",
      +  "properties": {
      +    "mark": {
      +      "enum": [
      +        "line",
      +        "bar",
      +        "point"
      +      ],
      +      "type": "string"
      +    },
      +    "rules": {
      +      "items": {
      +        "properties": {
      +          "label": {
      +            "type": "string"
      +          },
      +          "y": {
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "y",
      +          "label"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "series": {
      +      "items": {
      +        "properties": {
      +          "name": {
      +            "type": "string"
      +          },
      +          "y": {
      +            "items": {
      +              "type": [
      +                "number",
      +                "null"
      +              ]
      +            },
      +            "type": "array"
      +          }
      +        },
      +        "required": [
      +          "name",
      +          "y"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "title": {
      +      "type": "string"
      +    },
      +    "x": {
      +      "items": {
      +        "type": "number"
      +      },
      +      "type": "array"
      +    },
      +    "xLabel": {
      +      "type": "string"
      +    },
      +    "yLabel": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "x",
      +    "series",
      +    "xLabel",
      +    "yLabel"
      +  ],
      +  "type": [
      +    "object",
      +    "null"
      +  ]
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "record",
      -  "sequence",
      -  "success",
      -  "nEdits",
      -  "gcAfter",
      -  "caiAfter",
      -  "candidates",
      -  "distinct"
      -]New value: +[
      +  "record",
      +  "sequence",
      +  "success",
      +  "nEdits",
      +  "gcAfter",
      +  "caiAfter",
      +  "candidates",
      +  "distinct",
      +  "gcProfile"
      +]
  2. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare a non-destructive, non-read-only, closed-world operation. The description adds useful context that it emits a NEW record for downstream nodes, but does not mention whether the original subject is preserved, runtime/expense, or failure behavior.

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?

Two tightly written sentences with no waste. The action and scope come first, followed immediately by the output consequence.

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

Completeness4/5

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

For a complex optimizer with a full input schema and an output schema, the description covers the essential purpose, input nature, and output creation. It is nearly complete, though it could better position the tool against sibling sequence-design alternatives.

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

Parameters3/5

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

Schema description coverage is 100%, so parameter meaning is already well documented in the schema. The description only gestures at subject and constraints/objectives, adding little beyond the detailed schema descriptions for seed, candidates, and randomization_threshold.

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?

States a specific action ('Run the DnaChisel optimizer') and resource ('the subject'), plus the key inputs (constraints/objectives) and output behavior ('optimized sequence as a NEW record'). It is clear but does not explicitly distinguish itself from nearby sequence-design siblings such as back_translate or codon_optimality.

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 'with real constraints/objectives' implies the intended use case for hard requirements and soft goals. However, it gives no explicit when-to-use guidance, exclusions, or alternatives among the many sequence-design tools.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources