We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/RihardsJ/gmail-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
ensure_reply_subject.py•638 B
#!/usr/bin/env python3
"""
Email subject line utilities for replies.
"""
from typing import Optional
def ensure_reply_subject(subject: Optional[str]) -> str:
"""
Ensure subject line has 'Re: ' prefix for replies.
Args:
subject: Original email subject
Returns:
Subject with 'Re: ' prefix if not already present
Example:
>>> ensure_reply_subject("Hello")
'Re: Hello'
>>> ensure_reply_subject("Re: Hello")
'Re: Hello'
"""
if not subject:
return "Re: "
if not subject.lower().startswith("re:"):
return f"Re: {subject}"
return subject