Skip to main content
Glama

Port check

port_check
Read-only

Opens TCP connections to one port or a list of up to 10 ports on a host and reports each as open, closed or filtered, with the time taken. partial=true means not every port answered within the time budget; filtered means no answer arrived, not that the port is certainly closed. TCP only, no UDP. Anonymous, rate-limited per IP; hosts resolving to private or reserved addresses are refused.

Input Schema

NameRequiredDescriptionDefault
hostYesDomain name or host
portYesTCP port, or a list of up to 10 ports, e.g. 443 or [80, 443, 25]

Output Schema

NameRequiredDescriptionDefault
ipNo
okNo
hostNo
portNo
stateNo
timeMsNo
partialNo
resultsNo
portsRequestedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed17 schema fields changed
    • removedOutput schema / properties / host / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / host / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / ip / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / ip / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / ok / anyOf
      Removed value: -[
      -  {
      -    "type": "boolean"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / ok / type
      Added value: +[
      +  "boolean",
      +  "null"
      +]
    • removedOutput schema / properties / partial / anyOf
      Removed value: -[
      -  {
      -    "type": "boolean"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / partial / type
      Added value: +[
      +  "boolean",
      +  "null"
      +]
    • removedOutput schema / properties / port / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / port / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / portsRequested / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / portsRequested / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • changedOutput schema / properties / results / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "additionalProperties": {},
      -      "properties": {
      -        "error": {
      -          "anyOf": [
      -            {
      -              "type": "string"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ]
      -        },
      -        "ip": {
      -          "anyOf": [
      -            {
      -              "type": "string"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ]
      -        },
      -        "port": {
      -          "anyOf": [
      -            {
      -              "type": "number"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ]
      -        },
      -        "state": {
      -          "anyOf": [
      -            {
      -              "type": "string"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ]
      -        },
      -        "timeMs": {
      -          "anyOf": [
      -            {
      -              "type": "number"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ]
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "error": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "ip": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "port": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "state": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "timeMs": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / state / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / state / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / timeMs / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / timeMs / type
      Added value: +[
      +  "number",
      +  "null"
      +]
  2. Changed8 schema fields changed
    • addedInput schema / properties / port / anyOf
      Added value: +[
      +  {
      +    "maximum": 65535,
      +    "minimum": 1,
      +    "type": "integer"
      +  },
      +  {
      +    "items": {
      +      "maximum": 65535,
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    "maxItems": 10,
      +    "minItems": 1,
      +    "type": "array"
      +  }
      +]
    • changedInput schema / properties / port / description
      Previous value: -"TCP port to test"New value: +"TCP port, or a list of up to 10 ports, e.g. 443 or [80, 443, 25]"
    • removedInput schema / properties / port / maximum
      Removed value: -65535
    • removedInput schema / properties / port / minimum
      Removed value: -1
    • removedInput schema / properties / port / type
      Removed value: -"integer"
    • addedOutput schema / properties / partial
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / portsRequested
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / results
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "additionalProperties": {},
      +        "properties": {
      +          "error": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "ip": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "port": {
      +            "anyOf": [
      +              {
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "state": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "timeMs": {
      +            "anyOf": [
      +              {
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "properties": {
      +    "host": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "ip": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "ok": {
      +      "anyOf": [
      +        {
      +          "type": "boolean"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "port": {
      +      "anyOf": [
      +        {
      +          "type": "number"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "state": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "timeMs": {
      +      "anyOf": [
      +        {
      +          "type": "number"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  4. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the readOnlyHint/openWorldHint annotations: anonymous access, per-IP rate limiting, refusal of private/reserved addresses, a time budget that can yield partial=true, and the precise meaning of 'filtered'. These are exactly the operational caveats an agent needs before calling and interpreting the tool.

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

Conciseness5/5

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

Purpose is front-loaded in the first clause, followed by tightly packed caveats with zero filler. Four sentences, each carrying distinct information (semantics of filtered, transport limit, access policy).

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?

An output schema exists, so return values need not be described; the description instead covers the ambiguous parts an agent could misread (partial vs filtered). Combined with annotations for the safety profile, nothing needed to call or interpret it is missing.

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 description coverage is 100%, so the schema already documents host and the port/port-list union with min/max bounds. The description restates the 10-port cap and list form but adds no new syntax or format meaning, so the baseline 3 applies.

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 concrete verb and resource ('Opens TCP connections to one port or a list of up to 10 ports on a host') and the output shape (open/closed/filtered plus time taken). This clearly differentiates it from siblings like ping_test, website_status, and check_ssl, which do not probe raw TCP ports.

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?

Usage is implied through scope boundaries ('TCP only, no UDP') and result interpretation ('filtered means no answer arrived, not that the port is certainly closed'), which helps an agent read results correctly. However, it never says when to prefer this tool over siblings such as ping_test or website_status, nor any prerequisites beyond the private-address refusal.

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