litellm/tests/e2e/codex/mcp_server.py
ryan-crabbe-berri 385c6e2847
test(e2e): add a codex row that calls an mcp tool whose name is over 64 characters (#49826)
Codex sends the tool inside the mcp__vault namespace, so the joined name runs to 90 characters, past Bedrock's limit of 64. The row runs on every setup and passes on the random value the tool returns, with Codex seeing the tool's full original name. It guards LIT-10289, fixed by #53269
2026-11-24 16:28:11 -08:00

19 lines
395 B
Python

from __future__ import annotations
import os
from pathlib import Path
from typing import Final
from mcp.server.mcpserver import MCPServer
server: Final = MCPServer("vault")
@server.tool(name=os.environ.get("TOOL_NAME"))
def read_secret() -> str:
"""Return the current secret value."""
return Path(os.environ["SECRET_FILE"]).read_text()
if __name__ == "__main__":
server.run()