Fix format with black
This commit is contained in:
parent
265e9d25d3
commit
0482fff8c5
9 changed files with 100 additions and 99 deletions
|
|
@ -74,9 +74,7 @@ def register_game_tools(mcp: FastMCP, game_service: GameService):
|
|||
"success": True,
|
||||
"total_entries": len(entries),
|
||||
"entry_types": list(categorized.keys()),
|
||||
"entries_by_type": {
|
||||
t: len(e) for t, e in categorized.items()
|
||||
},
|
||||
"entries_by_type": {t: len(e) for t, e in categorized.items()},
|
||||
"recent_entries": entries[:5], # First 5 for context
|
||||
"available_fields": response.available_fields,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ def register_monitoring_tools(mcp: FastMCP):
|
|||
session_token = get_current_session_token()
|
||||
if session_token:
|
||||
from ..auth.session import SessionManager
|
||||
|
||||
session_manager = SessionManager()
|
||||
session = await session_manager.get_session(session_token)
|
||||
if session:
|
||||
|
|
@ -136,14 +137,16 @@ def register_monitoring_tools(mcp: FastMCP):
|
|||
previous = history[-1] if history else None
|
||||
|
||||
if current and previous:
|
||||
changes.append({
|
||||
"endpoint": endpoint,
|
||||
"current_hash": current.schema_hash,
|
||||
"previous_hash": previous.schema_hash,
|
||||
"current_fields": len(current.fields),
|
||||
"previous_fields": len(previous.fields),
|
||||
"changed_at": current.last_updated.isoformat(),
|
||||
})
|
||||
changes.append(
|
||||
{
|
||||
"endpoint": endpoint,
|
||||
"current_hash": current.schema_hash,
|
||||
"previous_hash": previous.schema_hash,
|
||||
"current_fields": len(current.fields),
|
||||
"previous_fields": len(previous.fields),
|
||||
"changed_at": current.last_updated.isoformat(),
|
||||
}
|
||||
)
|
||||
|
||||
return {
|
||||
"total_changes_tracked": len(changes),
|
||||
|
|
|
|||
|
|
@ -87,7 +87,9 @@ def register_profile_tools(mcp: FastMCP, profile_service: ProfileService):
|
|||
"total": len(achievements),
|
||||
"unlocked": len(unlocked),
|
||||
"locked": len(locked),
|
||||
"completion_rate": f"{len(unlocked) / len(achievements) * 100:.1f}%" if achievements else "0%",
|
||||
"completion_rate": (
|
||||
f"{len(unlocked) / len(achievements) * 100:.1f}%" if achievements else "0%"
|
||||
),
|
||||
},
|
||||
"unlocked_achievements": [
|
||||
{"name": a.name, "description": a.description, "unlocked_at": a.unlocked_at}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue