Skip to main content
Glama
FEAGI MCP Server

FEAGI MCP Server

Official
by feagi

build_reflex_mapping

Creates a custom pattern morphology and wires source-to-destination cortical areas in one call, combining morphology creation and mapping updates for reflex circuit setup.

Instructions

Create a custom patterns morphology and wire src->dst with it in one call.

Combines create_morphology + update_cortical_mapping. Pass compact pattern rows, not an enumerated voxel table:

.. code-block:: python

voxel_mappings = [
    {"src": ["*", "*", "*"], "dst": ["?", "?", "?"]},
    {"src": [382, "*", "*"], "dst": ["?", "?", 0]},
]

Tokens: *, ?, !, ?+N, ?-A:?+B, exact ints. Enumerated exact dumps that share one offset are rejected. On a PositionalServo absolute OPU, dest z=0 is max command; nonzero dst z is allowed (the decoder takes the mean of active z, so it mixes with other commands on the channel) and returns warnings. For stance-relative offsets see build_stance_relative_mapping.

By default the new mapping is appended; pass replace_existing=True to wipe existing rules first.

synaptic_delay_bursts must be >= 1 (the backend rejects a zero axonal delay during synapse regeneration); it defaults to 1. A value < 1 is rejected up front, before the morphology is created, so no orphan morphology is left behind.

Plasticity controls: plasticity_flag enables learning on the mapping (legacy STDP path). plasticity_mode is the new explicit selector: * "off" - no learning (equivalent to plasticity_flag=False); * "stdp" - classic correlation-based Hebbian STDP; * "rstdp" - reward-modulated STDP. Requires eligibility_decay_bursts (>=1) and modulators: one or more synaptic.reward modulator ids (positive magnitude rewards, negative punishes). Their driver areas must be driven by non-plastic input only; the server's wireheading lint rejects mappings that violate this.

When plasticity_mode is omitted, the server falls back to "stdp" if plasticity_flag=True, otherwise "off".

Optional max_weight and plasticity_eta forward to the same mapping rule keys accepted by :func:update_cortical_mapping. LTP/LTD are i8; use plasticity_eta to scale the weight update when a fractional learning rate is needed.

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": {
      "src_area_id": "<src_area_id>",
      "dst_area_id": "<dst_area_id>",
      "morphology_name": "<morphology_name>",
      "voxel_mappings": "<voxel_mappings>",
      "postsynaptic_current_multiplier": "<postsynaptic_current_multiplier>"
    },
    "name": "build_reflex_mapping"
  }
}

Input Schema

NameRequiredDescriptionDefault
max_weightNo
modulatorsNo
dst_area_idYes
src_area_idYes
ltd_multiplierNo
ltp_multiplierNo
plasticity_etaNo
voxel_mappingsYes
morphology_nameYes
plasticity_flagNo
plasticity_modeNo
replace_existingNo
morphology_scalarNo
plasticity_windowNo
plasticity_constantNo
synaptic_delay_burstsNo
eligibility_decay_burstsNo
postsynaptic_current_multiplierYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.14

TDQS

A4.8/5.0
Behavior5/5

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

No annotations are supplied, so the description carries the full disclosure burden, and it does so richly: up-front validation of ``synaptic_delay_bursts`` specifically so 'no orphan morphology is left behind', the PositionalServo absolute OPU z=0 semantics and the fact that mixed z values return ``warnings``, and the wireheading lint that rejects rstdp mappings whose modulators aren't driven by non-plastic input. These are non-obvious failure modes and side effects that cannot be inferred from the schema.

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?

The core action is front-loaded, the code block is the most efficient way to convey the compact row grammar, and the plasticity section is organized as a labeled list rather than prose. It runs long, and the trailing note on ``max_weight``/``plasticity_eta`` forwarding to ``update_cortical_mapping`` is somewhat diffuse, but for an 18-parameter tool almost every sentence earns its place.

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

Completeness5/5

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

An output schema exists, so the return contract needn't be spelled out, and the description still flags the one return value that matters operationally (``warnings`` on mixed dst z). Given the tool's complexity, the combination of routing to a sibling, input-format grammar, validation ordering, and plasticity-mode decision tree makes it complete enough to call correctly without further reading.

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% across 18 parameters, so the description must compensate, and it does for the hardest ones: the ``voxel_mappings`` row grammar (``*``, ``?``, ``!``, ``?+N``, ``?-A:?+B``, exact ints) with a worked example, the ``plasticity_mode`` enum values and the omitted-mode fallback rule, and the rstdp prerequisites for ``eligibility_decay_bursts`` and ``modulators``. It leaves ``morphology_scalar``, ``plasticity_window``, ``plasticity_constant``, ``ltp_multiplier``, ``ltd_multiplier`` and ``postsynaptic_current_multiplier`` (all required or defaulted in the schema) unexplained, which is the remaining gap.

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 opening sentence gives a specific verb and composite resource: 'Create a custom ``patterns`` morphology and wire src->dst with it in one call.' It immediately distinguishes the tool from siblings by naming the two operations it fuses (``create_morphology`` + ``update_cortical_mapping``), so an agent can tell it is a convenience composite rather than a bare morphology or bare mapping call.

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

Usage Guidelines5/5

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

The description states when to pick this over the primitive siblings ('in one call'), routes the stance-relative case to ``build_stance_relative_mapping``, and explains the append-vs-wipe decision ('By default the new mapping is appended; pass replace_existing=True to wipe existing rules first'). It also warns that enumerated exact dumps sharing one offset are rejected, which steers the caller toward the intended input form.

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

Deploy Server

Other Tools