Skip to main content
Glama
meshive-mcp

meshive-mcp

Official
by meshive

Lock or Unlock Port

set_port_lock
Idempotent

Lock or unlock an HTTPS port exposed by a pod without restarting it: locking restricts access to signed-in workspace members and valid access keys; unlocking makes the app public.

Instructions

Lock or unlock one port a pod exposes over HTTPS. The pod isn't restarted. The change takes a few seconds to take effect: the answer's state is locking or unlocking until it does (read lock_state with the pods tool). Repeating the call doesn't speed this up: wait by reading lock_state with the pods tool instead. locked=true locks it at once, without confirm: only workspace members signed in to the console and requests that carry one of the port's access keys (create_access_key) get through. Everything else gets 401, also programs that called the port without a key until now, so tell the user. locked=false unlocks it: anyone who knows the URL can then reach the app, with no sign-in and no key. Do it only when the user explicitly asks. With confirm=false (default) it only returns a summary and changes nothing; call again with confirm=true and the summary's pod_name after the user agreed. The port's access keys are kept and work again once it is locked. Only a workspace admin or billing member can change a lock. An internal port has no lock (port_not_public). Every write requires operation_id. Reuse the ID returned by the preview, or generate a UUID before the first call. Keep it for confirmation and all retries; a new ID means a new operation. After a timeout, check operation_status and resource state before retrying.

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": {
      "pod": "<pod>",
      "port": "<port>",
      "locked": "<locked>"
    },
    "name": "set_port_lock"
  }
}

Input Schema

NameRequiredDescriptionDefault
podYesThe pod_name from the pods tool. Its display name also works, except on a confirmed call (confirm=true) that opens a port, changes a key or signs out browsers: use the `pod_name` the preview returned.
portYesThe port number, from the pod's `endpoints` in the pods tool; it must be exposed over HTTPS (`access` locked or unlocked).
lockedYes
confirmNo
workspaceNo
operation_idNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.10.0

TDQS

A4.1/5.0
Behavior3/5

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

The description supplies a lot beyond the annotations: no pod restart, a multi-second propagation window reflected in `state`, and a consequential side effect (previously keyless callers start getting 401 after locking). That is useful, but the same point — read `lock_state` with the pods tool and wait rather than re-calling — is stated twice in consecutive sentences, and the `workspace` parameter's role is never explained, so the disclosure is not as efficient or complete as it could be.

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?

Front-loads the core action, then groups confirmation, permissions, and retry rules into short paragraphs. It earns most of its length, but the 'read `lock_state` with the pods tool instead' instruction is duplicated almost verbatim, which is wasted space in an already dense definition.

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

Completeness4/5

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

For a mutation with a preview/confirm flow, it covers the important pieces: propagation timing, permission errors, `port_not_public`, and the operation_id retry protocol. With an output schema present it is right not to enumerate return fields, though the unexplained `workspace` parameter leaves a small hole.

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

Parameters3/5

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

Schema coverage is only 33%, and the description does compensate meaningfully: it defines what `locked=true` and `locked=false` actually do, and pins down `confirm` plus the operation_id reuse rule. However, the `workspace` parameter is undocumented in both the schema and the description, and the `port` linkage to a pod's `endpoints` is only implied here, so the low coverage is not fully made up.

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?

States a specific verb and resource — 'Lock or unlock one port a pod exposes over HTTPS' — and immediately bounds the scope to a single port on a single pod. It also names the sibling tools an agent needs mid-flight (`pods` for `lock_state`, `create_access_key`), so the operation is unmistakable even without opening the schema.

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?

Gives explicit when/when-not guidance: lock at once, but unlock 'only when the user explicitly asks' because it removes sign-in and keys. It spells out the preview-then-confirm sequence with confirm=false returning a summary and confirm=true requiring the summary's `pod_name`, plus the prerequisites (admin or billing member).

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