Skip to main content
Glama

Look up a port assignment

iana_lookup_port
Read-onlyIdempotent

Look up IANA service name and transport protocol port assignments. Pass exactly one of port (a number, 0–65535), service (an exact service name such as "postgresql"), or keyword (words matched against service names and descriptions). Results list every transport (tcp, udp, sctp, dccp) separately, report the registry range row containing an unassigned port, and classify the port as System (0–1023), User (1024–49151), or Dynamic/Private (49152–65535). Service names registered without a port (DNS-SD names) appear with no port.

Input Schema

NameRequiredDescriptionDefault
portNoPort number, 0–65535 (a digit string such as "443" also works). Returns every row for that port plus the range row containing it. Pass exactly one of port, service, or keyword.
limitNoRequested maximum results, 1–1,000,000; values above 100 are clamped to 100 and disclosed as requested_limit and effective_limit. Default 25.
offsetNoNumber of keyword matches to skip; pass the next_offset of the previous response to get the next page. Default 0.
keywordNoWords matched as whole tokens against service names and descriptions, e.g. "network time". Pass exactly one of port, service, or keyword.
serviceNoExact service name, case-insensitive, up to 15 characters, e.g. "postgresql" or "whois++". Pass exactly one of port, service, or keyword.
transportNoKeep only rows for this transport protocol. Rows without a transport (most range rows and every service name without a port) are always kept. Applies to every mode.

Output Schema

NameRequiredDescriptionDefault
capNoThe limit applied.
modeNoWhich lookup ran.
errorNoPresent when the call failed. Absent on success.
foundNoTrue when a matching row after transport filtering has a registered service name; keyword mode checks all matches before paging.
shownNoResults returned.
noticeNoGuidance on a miss, a cut list, or another condition.
sourceNoProvenance and freshness of the answer.
truncatedNoTrue when more matches exist than were returned.
port_classNoPort mode: the requested port's class.
totalCountNoMatches before the limit was applied.
assignmentsNoMatching rows. Port mode: exact rows, then range rows containing the port. Other modes: ascending by port, port-less rows last.
next_offsetNoPass as offset for the next page; absent on the last.
effective_limitNoThe response limit after clamping, present when clamped.
requested_limitNoThe requested limit, present when clamped.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / found / description
      Previous value: -"True when a returned row has a registered service name."New value: +"True when a matching row after transport filtering has a registered service name; keyword mode checks all matches before paging."
  2. Changed4 schema fields changed
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum number of results to return, 1–100. Default 25."New value: +"Requested maximum results, 1–1,000,000; values above 100 are clamped to 100 and disclosed as requested_limit and effective_limit. Default 25."
    • changedInput schema / properties / limit / maximum
      Previous value: -100New value: +1000000
    • addedOutput schema / properties / effective_limit
      Added value: +{
      +  "description": "The response limit after clamping, present when clamped.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / requested_limit
      Added value: +{
      +  "description": "The requested limit, present when clamped.",
      +  "type": "number"
      +}
  3. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent and openWorld, so safety is covered; the description adds useful behavior beyond that: rows are split per transport, unassigned ports return the containing range row, and DNS-SD names appear with no port. The limit-clamping behavior is only in the schema, not here, so disclosure is not complete.

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?

Four dense sentences, front-loaded with purpose and the input-exclusivity rule, followed by result behavior. No filler, though the range-classification sentence and the DNS-SD sentence are details the output schema could plausibly carry.

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?

With six parameters, zero required, an output schema and full annotation coverage, the description supplies enough to invoke correctly: which mode to pick, what results look like, and edge cases for unassigned and portless names. Only pagination/clamping semantics remain unmentioned in prose.

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 all six parameters are already documented, and the description's restatement of the port range and exclusive-or constraint largely duplicates the per-parameter text. limit, offset and transport go entirely unmentioned in the description, so it adds little beyond the schema baseline.

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?

Specific verb+resource: 'Look up IANA service name and transport protocol port assignments.' The resource scope (port assignments) plus the three lookup modes make it trivially distinguishable from siblings like iana_lookup_media_type or iana_lookup_uri_scheme without opening a schema.

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?

Names the three mutually exclusive input modes ('Pass exactly one of port, service, or keyword') and gives short examples for each, so mode selection is unambiguous. It stops short of routing guidance against siblings (e.g., iana_search_registries or iana_get_registry_records) for broader discovery needs.

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.