Skip to main content

resolve_server_id_from_env

Function resolve_server_id_from_env 

Source
pub fn resolve_server_id_from_env() -> Option<String>
Expand description

Resolve a server_id from environment variables.

Checks, in order:

  1. PMCP_SERVER_ID
  2. AWS_LAMBDA_FUNCTION_NAME (Lambda runtime)

Returns None if neither is set. Empty strings are treated as unset.

This is the same resolution chain used by CodeModeConfig::resolve_server_id — exposed as a free function so tests and non-pipeline code can share it.