Api patterns

From wyre-technology/msp-claude-plugins · View interactive version

Api patterns is an AI agent skill from the GitHub repository wyre-technology/msp-claude-plugins. How to work with Cisco's hosted Meraki MCP server: its two tools (semantic_search and execute_api), the getOrganizations to getOrganizationNetworks to capability flow, passing parameters, single-page results, the per-organization rate limit, Conduit access tiers, error handling, and a table of verif

How to use this skill

Skill file

Meraki API Patterns

What the server is

Meraki is served by Cisco's first-party hosted MCP server (https://mcp.meraki.com/mcp). It exposes the read operations of the Meraki Dashboard API v1 as capabilities behind two tools, semantic_search and execute_api. A capability_id is the Dashboard API operationId, such as getOrganizationDevicesAvailabilities.

How it is reached through Conduit

The two tools

`semantic_search`

| Input | Type | Notes |

|---|---|---|

| query | string, required | Natural-language description of the data you need |

| top_k | integer, optional | Results to return. Default 5, range 1–20 |

It returns ranked results[], each with:

| Field | Meaning |

|---|---|

| capability_id | The ID to pass to execute_api |

| intent | One-line summary of what the capability returns |

| product_scope | common, wireless, switch, appliance, camera, sensor, cellularGateway, sm, ... |

| risk_tier | safe, elevated, destructive or unknown |

| tags | Free-form tags from the API spec |

| required_parameters[] | {name, location, required, type, description}. location is path or query |

Each result also carries a resource link, meraki://capabilities/<capability_id>. It holds the complete parameter list (optional filters, allowed ranges and defaults) and the API key scopes the capability needs. Read it before using an optional parameter. Through Conduit, resource URIs carry the vendor prefix, so read meraki+meraki://capabilities/<capability_id>.

`execute_api`

| Input | Type | Notes |

|---|---|---|

| capability_id | string, required | From semantic_search, or one of the two direct-call IDs below |

| parameters | object or null, optional | Path and query values together, keyed by parameter name |

The result is an object under result:

A failure comes back as a normal tool result, not a protocol error, so check result.type before you use data. The API key is never a tool argument.

The canonical flow

  1. Find the organization. Call getOrganizations directly, no search needed. Use id and name; confirm the right org with the user when there are several.
  2. Find networks. Call getOrganizationNetworks directly with the organizationId. Use id, name, productTypes and timeZone.
  3. Find the capability. Call semantic_search with a specific query. Prefer a result scoped to the organization (needs organizationId) over one you would have to loop per network or per device.
  4. Execute. Call execute_api with the chosen capability_id, every required_parameters entry, and any optional filters you confirmed in the resource link.
execute_api { "capability_id": "getOrganizations" }
execute_api { "capability_id": "getOrganizationNetworks", "parameters": { "organizationId": "<orgId>", "perPage": 100 } }
semantic_search { "query": "switch ports with errors or CRC drops on a switch", "top_k": 5 }
execute_api { "capability_id": "getDeviceSwitchPortsStatuses", "parameters": { "serial": "Q2XX-XXXX-XXXX" } }

When a capability in the table below fits, call it directly and skip step 3.

Writing good `semantic_search` queries

Name the object, the scope and the kind of data: status, history, configuration or rules. Use Meraki vocabulary where you know it.

| Good | Too vague |

|---|---|

| "devices offline in my org" | "devices" |

| "switch port status history" | "switches" |

| "recent config changes" | "changes" |

| "site-to-site VPN statuses across organization" | "vpn" |

| "SSID L3 firewall rules for a wireless network" | "meraki stuff" |

Never send a single-word query. If the results miss, rephrase with API terms ("availabilities", "uplink loss and latency", "change log", "inbound firewall rules") or raise top_k to 10. Check product_scope matches the hardware you are asking about.

Parameters

Pagination

execute_api returns one page per call.

Rate limit

Meraki allows 10 requests per second per organization, shared with every other API consumer of that organization. The hosted server retries rate-limited calls with exponential backoff, so do not add your own retry loop. Prefer one org-wide capability over a loop of per-device calls, and make calls one after another rather than in parallel against the same organization.

Errors

| What you see | Cause | What to do |

|---|---|---|

| "Authentication failed." or HTTP 401 | Key invalid, revoked or expired | The Conduit admin replaces the key in Conduit's Meraki connection |

| HTTP 403 or a permissions error | The key's dashboard admin cannot see that org or network | Use an org from getOrganizations, or ask for a key whose admin has access |

| getOrganizations returns an empty list | The key's admin has no organization on Meraki.com | Check the key belongs to an admin of the customer's org, and that the org is not on an unsupported dashboard |

| "Capability not found: X" | Misspelled or guessed ID, or a write operation, which does not exist here | Re-run semantic_search with a more specific query. Never guess IDs |

| "Missing required parameters" | A required parameter was left out | Add the names listed in recovery_suggestion |

| "Unsupported parameters" or "does not match its documented schema" | Wrong parameter name or type | Read the capability resource and correct it |

| Rate-limit error after retries | Organization budget exhausted | Wait, then retry with a narrower or org-wide request |

| execute_api is not in your tool list | No admin-tier Meraki grant in Conduit | Ask the Conduit org admin |

A customer on the China cloud, Federal, GovCloud or another localized dashboard cannot be reached through this server. Say so rather than retrying.

High-value capabilities

All are read-only and were returned by Cisco's live semantic_search. Required parameters are listed; check the resource for optional filters.

| Domain | capability_id | Required |

|---|---|---|

| Org & inventory | getOrganizations | none |

| | getOrganizationNetworks | organizationId |

| | getOrganizationDevices | organizationId |

| | getOrganizationInventoryDevices | organizationId |

| | getOrganizationInventoryDevicesEoxOverview | organizationId |

| Devices | getOrganizationDevicesAvailabilities | organizationId |

| | getOrganizationDevicesStatusesOverview | organizationId |

| | getOrganizationDevicesAvailabilitiesChangeHistory | organizationId |

| | getDevice | serial |

| | getOrganizationDevicesUplinksLossAndLatency | organizationId |

| | getDeviceLossAndLatencyHistory | serial, ip |

| Clients | getOrganizationClientsSearch | organizationId, mac |

| | getNetworkClients | networkId |

| | getNetworkClient | networkId, clientId |

| | getNetworkClientPolicy | networkId, clientId |

| Wireless | getNetworkWirelessSsids | networkId |

| | getNetworkWirelessSsidFirewallL3FirewallRules | networkId, number |

| | getNetworkWirelessRfProfiles | networkId |

| | getNetworkWirelessFailedConnections | networkId |

| | getOrganizationWirelessDevicesPacketLossByNetwork | organizationId |

| Switch | getOrganizationSwitchPortsStatusesBySwitch | organizationId |

| | getOrganizationSwitchPortsBySwitch | organizationId |

| | getDeviceSwitchPortsStatuses | serial |

| | getDeviceSwitchPortsStatusesPackets | serial |

| Appliance | getOrganizationApplianceUplinkStatuses | organizationId |

| | getOrganizationApplianceVpnStatuses | organizationId |

| | getNetworkApplianceFirewallL3FirewallRules | networkId |

| | getNetworkApplianceFirewallL7FirewallRules | networkId |

| | getNetworkApplianceFirewallInboundFirewallRules | networkId |

| | getNetworkApplianceFirewallPortForwardingRules | networkId |

| | getNetworkApplianceSecurityEvents | networkId |

| Sensors & cellular | getOrganizationSensorReadingsLatest | organizationId |

| | getOrganizationCellularGatewayUplinkStatuses | organizationId |

| | getOrganizationDevicesCellularUplinksBandsByDevice | organizationId |

| Change log, licensing, firmware | getOrganizationConfigurationChanges | organizationId |

| | getNetworkEvents | networkId |

| | getOrganizationLicensesOverview | organizationId |

| | getOrganizationFirmwareUpgrades | organizationId |

| | getOrganizationFirmwareUpgradesByDevice | organizationId |

To list the devices in one network, call getOrganizationDevices with a networkIds filter.

Related skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.