filit

๐Ÿ› ๏ธ Skill: Placement Spreadsheet Filler (MCP Tool)

install
source ยท Clone the upstream repo
git clone https://github.com/ponaalagar/filit
manifest: skill.md
source content

๐Ÿ› ๏ธ 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

Primary tool. Fills student data into a given spreadsheet.

Parameters:

ParameterTypeRequiredDescription
sheet_url
stringโœ…Google Sheets URL or Excel file path/URL
sheet_name
stringโŒSpecific tab/sheet name (defaults to first sheet)
profile_path
stringโœ…Path to local student profile JSON file
dry_run
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

Shows how profile fields will map to spreadsheet columns without writing anything.

Parameters:

ParameterTypeRequiredDescription
sheet_url
stringโœ…Google Sheets URL or Excel file path
profile_path
stringโœ…Path to local student profile JSON file

Returns: Column โ†’ Profile field mapping as a table.


3.
update_profile

Updates one or more fields in the local student profile.

Parameters:

ParameterTypeRequiredDescription
profile_path
stringโœ…Path to profile JSON
updates
objectโœ…Key-value pairs to update (e.g.
{"cgpa": "9.1"}
)

4.
check_profile

Reads and displays the current student profile.

Parameters:

ParameterTypeRequiredDescription
profile_path
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
    openpyxl
    read/write.
  • For cloud-hosted Excel (OneDrive/SharePoint): URL download + re-upload via Microsoft Graph API (future scope).

Error Handling

ScenarioBehaviour
Profile field not in sheetSilently skipped, reported in response
Sheet column not in profileListed under
unmapped_columns
Auth failureReturns auth URL for re-authentication
Network errorRetry 3x, then return error message
Sheet not found / wrong tab nameReturns 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
    profile_path
    (student-side) and
    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