import { EnhancedTransport } from '@src/core/types/transport.js';
/**
* Get the effective request timeout with proper precedence
* Returns: requestTimeout > timeout (fallback) > undefined
*
* @param transport The transport configuration
* @returns The effective request timeout in milliseconds, or undefined if not set
*/
export function getRequestTimeout(transport: EnhancedTransport): number | undefined {
return transport.requestTimeout ?? transport.timeout;
}
/**
* Get the effective connection timeout with proper precedence
* Returns: connectionTimeout > timeout (fallback) > undefined
*
* @param transport The transport configuration
* @returns The effective connection timeout in milliseconds, or undefined if not set
*/
export function getConnectionTimeout(transport: EnhancedTransport): number | undefined {
return transport.connectionTimeout ?? transport.timeout;
}
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/1mcp-app/agent'
If you have feedback or need assistance with the MCP directory API, please join our Discord server