update_status
Update your personal status details including location, device, and notes.
Instructions
Update your status information
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| city | No | ||
| state | No | ||
| country | No | ||
| laptop_os | No | ||
| laptop_model | No | ||
| notes | No |
Implementation Reference
- src/server.py:341-375 (handler)The main handler for the 'update_status' tool in call_tool(). It retrieves the current status, updates fields (name, location, laptop_details, notes), sets last_updated, persists via db.update_status(), and returns the updated status as JSON.
elif name == "update_status": current_status = db.get_status() # Update fields if provided if "name" in arguments: current_status.name = arguments["name"] if any(key in arguments for key in ["city", "state", "country"]): if not current_status.current_location: current_status.current_location = Location() if "city" in arguments: current_status.current_location.city = arguments["city"] if "state" in arguments: current_status.current_location.state = arguments["state"] if "country" in arguments: current_status.current_location.country = arguments["country"] if any(key in arguments for key in ["laptop_os", "laptop_model"]): if not current_status.laptop_details: current_status.laptop_details = LaptopDetails() if "laptop_os" in arguments: current_status.laptop_details.os = arguments["laptop_os"] if "laptop_model" in arguments: current_status.laptop_details.model = arguments["laptop_model"] if "notes" in arguments: current_status.notes = arguments["notes"] current_status.last_updated = datetime.now() updated_status = db.update_status(current_status) return [TextContent( type="text", text=json.dumps(updated_status.model_dump(), default=str, indent=2) )] - src/server.py:112-127 (schema)Tool registration with input schema for 'update_status'. Defines optional properties: name, city, state, country, laptop_os, laptop_model, notes.
Tool( name="update_status", description="Update your status information", inputSchema={ "type": "object", "properties": { "name": {"type": "string"}, "city": {"type": "string"}, "state": {"type": "string"}, "country": {"type": "string"}, "laptop_os": {"type": "string"}, "laptop_model": {"type": "string"}, "notes": {"type": "string"} } } ), - src/server.py:99-321 (registration)The list_tools() function that registers all tools including 'update_status' (lines 112-127) as an MCP tool with the server.
@server.list_tools() async def list_tools() -> List[Tool]: """List available tools""" return [ Tool( name="get_status", description="Get your current status including location, laptop details, and permissions", inputSchema={ "type": "object", "properties": {}, "required": [] } ), Tool( name="update_status", description="Update your status information", inputSchema={ "type": "object", "properties": { "name": {"type": "string"}, "city": {"type": "string"}, "state": {"type": "string"}, "country": {"type": "string"}, "laptop_os": {"type": "string"}, "laptop_model": {"type": "string"}, "notes": {"type": "string"} } } ), Tool( name="create_project", description="Create a new project", inputSchema={ "type": "object", "properties": { "name": {"type": "string"}, "description": {"type": "string"}, "status": {"type": "string", "enum": ["not_started", "in_progress", "on_hold", "completed", "cancelled"]}, "priority": {"type": "string", "enum": ["low", "medium", "high", "urgent"]}, "start_date": {"type": "string", "format": "date-time"}, "end_date": {"type": "string", "format": "date-time"}, "tags": {"type": "array", "items": {"type": "string"}} }, "required": ["name"] } ), Tool( name="list_projects", description="List all projects or filter by status", inputSchema={ "type": "object", "properties": { "status": {"type": "string", "enum": ["not_started", "in_progress", "on_hold", "completed", "cancelled"]} } } ), Tool( name="get_project", description="Get details of a specific project", inputSchema={ "type": "object", "properties": { "project_id": {"type": "string"} }, "required": ["project_id"] } ), Tool( name="update_project", description="Update a project's information", inputSchema={ "type": "object", "properties": { "project_id": {"type": "string"}, "name": {"type": "string"}, "description": {"type": "string"}, "status": {"type": "string", "enum": ["not_started", "in_progress", "on_hold", "completed", "cancelled"]}, "priority": {"type": "string", "enum": ["low", "medium", "high", "urgent"]}, "progress": {"type": "integer", "minimum": 0, "maximum": 100}, "notes": {"type": "string"} }, "required": ["project_id"] } ), Tool( name="add_project_task", description="Add a task to a project", inputSchema={ "type": "object", "properties": { "project_id": {"type": "string"}, "title": {"type": "string"}, "description": {"type": "string"}, "status": {"type": "string", "enum": ["todo", "in_progress", "done", "blocked"]}, "priority": {"type": "string", "enum": ["low", "medium", "high", "urgent"]}, "due_date": {"type": "string", "format": "date-time"} }, "required": ["project_id", "title"] } ), Tool( name="create_todo", description="Create a new todo/reminder", inputSchema={ "type": "object", "properties": { "title": {"type": "string"}, "description": {"type": "string"}, "due_date": {"type": "string", "format": "date-time"}, "reminder_date": {"type": "string", "format": "date-time"}, "priority": {"type": "string", "enum": ["low", "medium", "high", "urgent"]}, "tags": {"type": "array", "items": {"type": "string"}} }, "required": ["title"] } ), Tool( name="list_todos", description="List todos, optionally filtered by completion status", inputSchema={ "type": "object", "properties": { "completed": {"type": "boolean"} } } ), Tool( name="complete_todo", description="Mark a todo as completed", inputSchema={ "type": "object", "properties": { "todo_id": {"type": "string"} }, "required": ["todo_id"] } ), Tool( name="create_calendar_event", description="Create a calendar event", inputSchema={ "type": "object", "properties": { "title": {"type": "string"}, "description": {"type": "string"}, "start_time": {"type": "string", "format": "date-time"}, "end_time": {"type": "string", "format": "date-time"}, "location": {"type": "string"}, "attendees": {"type": "array", "items": {"type": "string"}}, "reminder_minutes": {"type": "integer"} }, "required": ["title", "start_time", "end_time"] } ), Tool( name="list_calendar_events", description="List calendar events within a date range", inputSchema={ "type": "object", "properties": { "start_date": {"type": "string", "format": "date-time"}, "end_date": {"type": "string", "format": "date-time"} } } ), Tool( name="upload_document", description="Upload a document to the personal assistant", inputSchema={ "type": "object", "properties": { "title": {"type": "string"}, "content_base64": {"type": "string", "description": "Base64 encoded file content"}, "description": {"type": "string"}, "tags": {"type": "array", "items": {"type": "string"}} }, "required": ["title", "content_base64"] } ), Tool( name="create_external_document", description="Create a reference to an external document (e.g., cloud storage link)", inputSchema={ "type": "object", "properties": { "title": {"type": "string"}, "external_url": {"type": "string"}, "description": {"type": "string"}, "tags": {"type": "array", "items": {"type": "string"}} }, "required": ["title", "external_url"] } ), Tool( name="list_documents", description="List all documents, optionally filtered by tags", inputSchema={ "type": "object", "properties": { "tags": {"type": "array", "items": {"type": "string"}} } } ), Tool( name="get_document", description="Get details of a specific document", inputSchema={ "type": "object", "properties": { "document_id": {"type": "string"} }, "required": ["document_id"] } ), Tool( name="get_dashboard", description="Get a dashboard view of active projects, upcoming todos, and events", inputSchema={ "type": "object", "properties": {} } ) ] - src/tinydb_database.py:61-61 (helper)TinyDBDatabase implementation of update_status() - truncates the status table and inserts the serialized status data (with thread lock).
class TinyDBDatabase(DatabaseInterface): - src/sqlite_database.py:135-142 (helper)SQLiteDatabase implementation of update_status() - uses INSERT OR REPLACE into user_status table within a transaction.
def update_status(self, status: UserStatus) -> UserStatus: conn = self._get_connection() with self._transaction(): conn.execute( "INSERT OR REPLACE INTO user_status (id, data) VALUES (1, ?)", (self._serialize(status),) ) return status