mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-28 00:00:38 +00:00
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
19 lines
395 B
Python
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()
|