Skip to main content
Glama

Solve simultaneous MCU peripheral pin-muxing

datasheetvend_solve_pin_mux
Read-onlyIdempotent

Check whether MCU buses (I2C, SPI, UART, SDIO, CAN, USB) and a number of ADC channels can each have their own physical pins. Works on any chip: supply your own pins[] (pin_number, pin_name, functions[]), or sample_part_id ('stm32f405rg_lqfp64' or 'stm32g031k8_ufqfpn32') to try it. Ask by number with requested_buses (e.g. {"CAN": 1, "SDIO": 1}) and requested_adc_channels, and the controller choices that fit come back in layouts[]; or name controllers in selected_peripheral_ids (e.g. ['sdio:sdio', 'i2c:i2c1']). Call with no selection to list the ids. verdict is 'fits', 'fits_unverified' (pins are free, but the pin list does not show those positions can be combined), 'does_not_fit' (with the signals and pins that run out) or 'cannot_tell' (the pin list is incomplete). Exact matching, no model call, free, no API key, reads no account data. Remap groups, IO sets, shared peripherals, DMA, timers and electrical limits are not modelled.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "datasheetvend_solve_pin_mux"
  }
}

Input Schema

NameRequiredDescriptionDefault
pinsNoCustom pinout matrix to solve against (overrides sample_part_id).
sdio_bitsNoData width used when SDIO is asked for by number.
locked_pinsNoPins the board already uses, by pin number or pin name.
sample_part_idNoOptional pre-loaded sample MCU package to solve against.
package_variantNoPackage label when supplying custom pins[], e.g. 'LQFP64'. It is echoed, not checked against the pins.
requested_busesNoHow many buses of each kind are needed, on whichever controllers fit, e.g. {"CAN": 1, "SDIO": 1}. Controllers named in selected_peripheral_ids count toward the number.
reserve_swo_pinNoAlso reserve the serial wire output pin.
reserve_jtag_pinsNoAlso reserve every JTAG pin.
reserve_clock_pinsNoReserve HSE/LSE crystal oscillator pins.
reserve_debug_pinsNoReserve the two-wire debug pins (SWDIO/SWCLK or equivalent).
requested_adc_channelsNoNumber of single-ended ADC channels needed at the same time, each on its own pin.
reserve_boot_reset_pinsNoReserve boot and reset pins.
selected_peripheral_idsNoPeripheral instance IDs to enable simultaneously, e.g. ['sdio:sdio', 'i2c:i2c1', 'i2c:i2c2', 'spi:spi2']. Leave empty to discover available peripherals.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive/closed-world, and the description adds real operational context on top: exact matching (no model call), free, no API key, reads no account data, plus the full verdict taxonomy including the subtle 'fits_unverified' case where pins are free but combinability is unproven and 'cannot_tell' for incomplete pin lists. It also discloses the modelling boundaries, which prevents over-trusting a 'fits' result.

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?

A single dense paragraph, but it is front-loaded with the goal before the input modes, then the verdicts, then the caveats. Nearly every clause carries information; the inline JSON examples are justified because they disambiguate two similarly named request shapes.

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 13-parameter, nested-object tool with no output schema, the description still tells the agent what comes back (layouts[], verdict plus the signals and pins that run out) and which verdict values to expect. Defaults and reserve_* flags are covered by the schema, so nothing material is left for the agent to guess.

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 coverage is 100%, so the baseline is a 3, but the description adds value beyond the schema: it explains the interaction between the two selection styles ('Controllers named in selected_peripheral_ids count toward the number'), the pins[]-overrides-sample_part_id precedence, and — most usefully — that an empty selection returns the list of available ids, giving the all-defaults call a purpose.

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 first sentence names a specific verb and resource: check whether MCU buses (I2C, SPI, UART, SDIO, CAN, USB) and ADC channels can each get their own physical pins. It is clearly distinguishable from siblings such as extract_peripheral_matrix (extraction) and check_bootstrap_pins (single-topic check) because it solves a simultaneous multi-peripheral allocation problem.

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

Usage Guidelines4/5

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

It gives two concrete entry paths (supply pins[] or use sample_part_id), two request styles (requested_buses by count vs selected_peripheral_ids by id), and a discovery call ('Call with no selection to list the ids'). It also states the scope that is out of bounds ('Remap groups, IO sets, shared peripherals, DMA, timers and electrical limits are not modelled'), but it never names a sibling tool to use instead for those cases.

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