SSkilltecabyclaudinhocode
Enviar skill
← Voltar para o catálogo

filit

Documentos

Um MCP que preenche automaticamente planilhas com o contexto fornecido.

0estrelas
Ver no GitHub ↗Autor: ponaalagar

🛠️ 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_urlstringGoogle Sheets URL or Excel file path/URL
sheet_namestringSpecific tab/sheet name (defaults to first sheet)
profile_pathstringPath to local student profile JSON file
dry_runbooleanIf 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_urlstringGoogle Sheets URL or Excel file path
profile_pathstringPath 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_pathstringPath to profile JSON
updatesobjectKey-value pairs to update (e.g. {"cgpa": "9.1"})

4. check_profile

Reads and displays the current student profile.

Parameters:

ParameterTypeRequiredDescription
profile_pathstringPath 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

Como adicionar

/plugin marketplace add ponaalagar/filit

O comando exato pode variar conforme o repositório. Confira o README no GitHub.

Comentários · Nenhum comentário

Entre para comentar. Entrar

  • Ainda não há comentários. Seja o primeiro.