git clone https://github.com/ponaalagar/filit
skill.md๐ ๏ธ Skill: Placement Spreadsheet Filler (MCP Tool)
Skill Name
placement-sheet-filler
Description
An MCP tool that automatically fills student placement details into Google Sheets or Excel files. The tool reads the student's profile from a local JSON file, fetches the headers from the target spreadsheet, smart-maps profile fields to columns, and appends a new row.
Exposed MCP Tools
1. fill_sheet
fill_sheetPrimary tool. Fills student data into a given spreadsheet.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| string | โ | Google Sheets URL or Excel file path/URL |
| string | โ | Specific tab/sheet name (defaults to first sheet) |
| string | โ | Path to local student profile JSON file |
| boolean | โ | If true, preview mapping without writing (default: false) |
Returns:
{ "status": "success", "row_appended": 42, "mapped_fields": { "Name": "John Doe", "Roll Number": "21CS001", "Branch": "CSE", "CGPA": "8.9" }, "unmapped_columns": ["Internship Duration"] }
2. preview_mapping
preview_mappingShows how profile fields will map to spreadsheet columns without writing anything.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| string | โ | Google Sheets URL or Excel file path |
| string | โ | Path to local student profile JSON file |
Returns: Column โ Profile field mapping as a table.
3. update_profile
update_profileUpdates one or more fields in the local student profile.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| string | โ | Path to profile JSON |
| object | โ | Key-value pairs to update (e.g. ) |
4. check_profile
check_profileReads and displays the current student profile.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| string | โ | Path to profile JSON |
Student Profile Format (JSON)
{ "name": "John Doe", "roll_no": "21CS001", "branch": "Computer Science & Engineering", "cgpa": "8.9", "email": "john@college.edu", "phone": "+91 9876543210", "resume_link": "https://drive.google.com/..." }
๐ก Extensible: New fields can be added to this file at any time. The mapping engine will automatically discover them.
Smart Column Mapping Algorithm
The tool uses a multi-stage fuzzy + semantic mapping strategy:
Stage 1: Exact match e.g., column "email" โ profile field "email" Stage 2: Fuzzy string match (Levenshtein distance) e.g., column "Roll Number" โ profile field "roll_no" Stage 3: Synonym/alias table e.g., column "CGPA / GPA" โ profile field "cgpa" Stage 4: LLM-assisted mapping (fallback) e.g., column "Academic Performance" โ profile field "cgpa" Stage 5: Skip + report Columns with no confident match are listed as "unmapped_columns"
Confidence threshold: Matches below 60% confidence are skipped and reported.
Authentication
Google Sheets
- Uses OAuth 2.0 with the student's own Google account.
- On first use, the user opens a one-time auth URL in their browser.
- Token is cached locally for future use.
- Scope:
https://www.googleapis.com/auth/spreadsheets
Excel
- For local files: direct
read/write.openpyxl - For cloud-hosted Excel (OneDrive/SharePoint): URL download + re-upload via Microsoft Graph API (future scope).
Error Handling
| Scenario | Behaviour |
|---|---|
| Profile field not in sheet | Silently skipped, reported in response |
| Sheet column not in profile | Listed under |
| Auth failure | Returns auth URL for re-authentication |
| Network error | Retry 3x, then return error message |
| Sheet not found / wrong tab name | Returns list of available tab names |
| Duplicate row detection (future) | Warn user, confirm before appending |
Hosting Notes
- MCP server runs as a stateless HTTP service.
- Each request carries the
(student-side) andprofile_path
.sheet_url - No student data persists on the server โ all profile data stays local with the student.
- Deployable on: Railway, Render, VPS, Docker.
Usage Example (MCP Client)
User: Fill my details in this Google Sheet: https://docs.google.com/spreadsheets/d/... Tool Call: fill_sheet( sheet_url = "https://docs.google.com/...", profile_path = "/home/student/profile.json" ) Response: โ Row appended successfully! Mapped: Name, Roll No, Branch, CGPA, Email, Phone Unmapped columns: ["Preferred Location", "Internship Duration"]
File Structure (Project)
placement-sheet-filler/ โโโ server.py # MCP server entry point โโโ tools/ โ โโโ fill_sheet.py # fill_sheet tool logic โ โโโ preview_mapping.py # preview_mapping tool logic โ โโโ update_profile.py # update_profile tool logic โ โโโ check_profile.py # check_profile tool logic โโโ core/ โ โโโ mapper.py # Smart column mapping engine โ โโโ sheets_client.py # Google Sheets API wrapper โ โโโ excel_client.py # openpyxl Excel wrapper โโโ auth/ โ โโโ google_auth.py # OAuth 2.0 flow handler โโโ profile.json # Student profile (local, not committed) โโโ requirements.txt โโโ README.md