Skip to main content
Glama

Jean — Molecular Biology & Genomics

optimize_sequence

Run the DnaChisel optimizer over the subject with real constraints/objectives (GC window, pattern avoidance, translation enforcement, …).

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

C2.9/5.0
Behavior2/5

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

Annotations only say it is not read-only and not destructive or open-world. The description does not explain what the optimizer produces, whether results are persisted as new records, how expensive the run is, or that a deterministic problem yields identical candidates unless randomization_threshold is lowered. That determinism caveat is materially important behavior and only appears buried in a parameter description.

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?

One compact sentence, front-loaded with the verb and engine, with no filler. It is efficient, though the trailing ellipsis is slightly informal for a tool definition.

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?

An output schema exists and every parameter is documented, so the description need not explain return values. However, for a solver with nested constraint/objective objects and no required parameters, the description should say more about what a successful run yields and when to prefer a simpler sibling.

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 the heavy lifting on seed, candidates, subject, constraints, objectives, and randomization_threshold is already done in the schema. The parenthetical examples (GC window, pattern avoidance, translation enforcement) merely echo what the constraints/objectives schema already lists, adding no syntax or format detail beyond it.

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 names a specific verb and engine ("Run the DnaChisel optimizer") plus the target ("the subject") and the inputs that drive it (constraints/objectives). It does not differentiate this tool from related siblings such as back_translate, codon_optimality, or design_expression_variants, so it falls short of a 5.

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

Usage Guidelines2/5

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

There is no explicit when-to-use or when-not guidance and no named alternative. The phrase "with real constraints/objectives" hints at a contrast with some simpler path, but the agent must infer that this is the tool for hard-constraint codon optimization rather than a lighter analysis.

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