Skip to main content
Glama

updateDeviceSwitchPort

Update configuration for a switch port on a Meraki device, including name, enabled state, PoE, VLAN, and voice VLAN.

Instructions

Update switch port configuration. For the full parameter set use call_meraki_api.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serialYes
portIdYes
nameNo
enabledNo
poeEnabledNo
typeNo
vlanNo
voiceVlanNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Handler in meraki-mcp.py (non-dynamic): The actual MCP tool function named 'update_switch_port' which calls the Meraki SDK's dashboard.switch.updateDeviceSwitchPort() to update a switch port.
    @mcp.tool()
    def update_switch_port(serial: str, port_id: str, name: str = None, tags: list[str] = None, enabled: bool = None, vlan: int = None) -> str:
        """Update a switch port"""
        kwargs = _build_kwargs(name=name, tags=tags, enabled=enabled, vlan=vlan)
        result = dashboard.switch.updateDeviceSwitchPort(serial, port_id, **kwargs)
        return json.dumps(result, indent=2)
  • Handler in meraki-mcp-dynamic.py (dynamic/hybrid version): The MCP tool function named exactly 'updateDeviceSwitchPort' that accepts additional parameters (poeEnabled, type, voiceVlan) and delegates to the SDK via call_meraki_method.
    @mcp.tool()
    async def updateDeviceSwitchPort(
        serial: str,
        portId: str,
        name: str = None,
        enabled: bool = None,
        poeEnabled: bool = None,
        type: str = None,
        vlan: int = None,
        voiceVlan: int = None,
    ) -> str:
        """Update switch port configuration. For the full parameter set use call_meraki_api."""
        params = {
            "serial": serial,
            "portId": portId,
            **{k: v for k, v in dict(
                name=name, enabled=enabled, poeEnabled=poeEnabled,
                type=type, vlan=vlan, voiceVlan=voiceVlan
            ).items() if v is not None}
        }
        return await call_meraki_method("switch", "updateDeviceSwitchPort", **params)
  • Registration reference: 'updateDeviceSwitchPort' is listed in the pre_registered_tools array in get_mcp_config() in the dynamic file.
    "pre_registered_tools": ["getOrganizations", "getOrganizationAdmins", "getOrganizationNetworks",
                              "getOrganizationDevices", "getNetwork", "getNetworkClients",
                              "getNetworkEvents", "getNetworkDevices", "getDevice",
                              "getNetworkWirelessSsids", "getDeviceSwitchPorts", "updateDeviceSwitchPort"],
  • Helper function: call_meraki_method is the async wrapper used by the updateDeviceSwitchPort handler to dispatch the call to the Meraki SDK.
    async def call_meraki_method(section: str, method: str, **params) -> str:
        """Internal async wrapper for pre-registered tools"""
        return await to_async(_call_meraki_method_internal)(section, method, params)
Behavior2/5

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

No annotations provided; the description only states it updates the configuration, with no details on side effects, permissions, idempotency, or what happens to existing settings. The reference to call_meraki_api does not disclose behavioral traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with no extraneous information, but the second sentence is a pointer to another tool rather than enriching the description. Could be more structured with parameter roles.

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

Completeness2/5

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

Given 8 parameters (2 required) with no schema descriptions and no annotations, the description is insufficient for an agent to correctly invoke the tool. Output schema exists but does not compensate for missing param context.

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

Parameters1/5

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

Schema description coverage is 0% and the description provides no information about any of the 8 parameters, their purpose, or constraints. The phrase 'update switch port configuration' is too vague to compensate.

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?

Clearly states updating switch port configuration, verb and resource are clear. Distinguishes from read-only sibling getDeviceSwitchPorts. However, it does not explicitly differentiate from the generic call_meraki_api which can also perform updates.

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?

Mentions using call_meraki_api for the full parameter set, implying this tool is for a subset. However, it does not specify when to choose this tool over alternatives, nor when not to use it.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/CiscoDevNet/meraki-magic-mcp-community'

If you have feedback or need assistance with the MCP directory API, please join our Discord server