Skip to main content
Glama
FEAGI MCP Server

FEAGI MCP Server

Official
by feagi

check_port_contract

Compare a live cortical area with a datasheet port row to validate shape, drive, coding, bins and geometry, returning per-check pass/fail results with observed and datasheet values.

Instructions

Check one live area against one datasheet port row; per-check pass/fail with numbers.

Reads the area (get_area_parameters) and compares shape, drive scalars (threshold, psp, leak, refractory, accumulate), code and bins (live_bins must be at least min_bins_that_pass). For a live IPU or OPU it compares kind and signed (decoded from the cortical id), frame and positioning (live encoding_type / encoding_format), X/Y per device (dev_count multiplies X) and Z depth against the port's fits; the result adds advisory text on conversions (nothing is wired). A null datasheet value is skipped: datasheet states no value; with latency_probe it also checks that the port's path responds within the datasheet latency. Each check reports the datasheet value, the observed value and the tolerance used (the contract has no tolerance field: exact unless the row's drive.tolerance_rel / latency_tolerance_bursts or the arguments say otherwise). Nothing is fixed; a mismatch is reported with the datasheet's number.

The datasheet does not say how you encode your device, so pass live_code and live_bins yourself; checks lacking a live value are skipped, not passed.

WARNING: latency_probe STIMULATES the area and CHANGES LIVE ACTIVITY (it force-fires voxels via probe_area_response). Use it only when the brain is not mid-experiment. Without it this tool is read-only. Polarity (sign) is not auto-compared: the datasheet states positive as free text, so check it with auto_polarity_probe and compare by hand.

Args: port: One port row from get_block_datasheet (datasheet.ports[i]). area_id: Cortical id of YOUR area that plays this port. live_code: Code your area uses (binary, thermometer, one-hot, value plane, rate). live_bins: Number of value bins you drive or read on this port. latency_probe: Optional {"stimulus_area", "stimulus_voxels", "observe_area", "burst_period_ms"}. The after-window waits (latency_bursts + 1) * burst_period_ms; path_responds is then checked. drive_rel_tolerance: Relative tolerance for drive scalars (default exact). latency_tolerance_bursts: Allowed latency difference in bursts (default 0).

Returns: {"port", "passed", "failed_checks", "checks": [...], "area_id"}.

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": {
      "port": "<port>",
      "area_id": "<area_id>"
    },
    "name": "check_port_contract"
  }
}

Input Schema

NameRequiredDescriptionDefault
portYes
area_idYes
live_binsNo
live_codeNo
latency_probeNo
drive_rel_toleranceNo
latency_tolerance_burstsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.14

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses that the tool is read-only without latency_probe, that latency_probe stimulates the area and force-fires voxels via probe_area_response (changing live activity), that nothing is fixed on mismatch, that missing live values yield 'skipped' rather than 'passed', and how tolerances default to exact. These are the non-obvious behaviors an agent must know before invoking.

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 structure is strong: one-line summary first, then mechanism, then a capitalized warning, then a formatted Args/Returns block. It is long, and a few points are restated ("nothing is wired" vs "Nothing is fixed"), so it is slightly over-full even though nearly every sentence carries operational information.

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?

For a complex seven-parameter tool with nested objects and zero schema coverage, the description covers inputs, skip semantics, tolerance defaults, the stimulation side effect, and which comparisons are and are not automated. It even restates the return envelope, though an output schema exists, so an agent has everything needed to call it correctly.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate, and it documents all seven parameters including the nested latency_probe object's keys (stimulus_area, stimulus_voxels, observe_area, burst_period_ms) and the after-window formula (latency_bursts + 1) * burst_period_ms. It also enumerates live_code values (binary, thermometer, one-hot, value plane, rate) and explains both tolerance defaults, adding meaning the bare schema does not provide.

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 line states a specific verb and both operands: check one live area against one datasheet port row, producing per-check pass/fail with numbers. It immediately distinguishes the tool from siblings that read or mutate state (get_area_parameters, set_port_encoding) by framing it as a comparison/contract check.

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?

It names the sources it consumes (get_area_parameters, live_bins, get_block_datasheet) and explicitly states the user must supply live_code and live_bins, since the datasheet doesn't describe encoding. It also gives an explicit when-not: latency_probe should only be used when the brain is not mid-experiment, and it routes polarity checks to auto_polarity_probe with manual comparison.

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