Skip to main content
Glama
photography.py1.39 kB
from typing import Literal from fastmcp import FastMCP from ..config.constants import ASPECT_RATIOS import logging def register_photography_prompts(server: FastMCP): """Register photography-related prompts with the FastMCP server.""" @server.prompt def photorealistic_shot( subject: str, composition: str, lighting: str, camera: str, aspect_hint: Literal[ "Square image", "Portrait", "Landscape", "16:9", "4:3" ] = "Square image", ) -> str: """Generate a prompt for high-quality photorealistic images.""" logger = logging.getLogger(__name__) try: # Validate aspect hint if aspect_hint not in ASPECT_RATIOS: logger.warning(f"Invalid aspect hint: {aspect_hint}, using default") aspect_hint = "Square image" prompt = ( f"A photorealistic {subject}. Composition: {composition}. " f"Lighting: {lighting}. Camera: {camera}. {aspect_hint}." ) logger.debug(f"Generated photorealistic_shot prompt: {prompt[:100]}...") return prompt except Exception as e: logger.error(f"Error generating photorealistic_shot prompt: {e}") # Return a basic fallback prompt return f"A photorealistic {subject}. {aspect_hint}."

Latest Blog Posts

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/zhongweili/nanobanana-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server