mirror of
https://github.com/ArthurDanjou/artapi.git
synced 2026-01-28 00:50:27 +01:00
Refactor MCP API: Remove deprecated endpoints and add new resource handlers
- Deleted old API endpoints for contact, education, experiences, hobbies, languages, profile, projects, skills, and uses. - Introduced new resource handlers for contact, education, experiences, hobbies, languages, profile, projects, skills, and uses with structured responses. - Added new MCP prompts for real-time activity, contact information, hobbies, languages, profile, projects, skills, stats, and status page. - Implemented tools for fetching real-time activity, resume links, coding stats, and weather information. - Removed legacy MCP server route and replaced it with a modular approach for better maintainability.
This commit is contained in:
15
server/mcp/tools/resume-link.ts
Normal file
15
server/mcp/tools/resume-link.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import z from 'zod'
|
||||
|
||||
export default defineMcpTool({
|
||||
description: 'Retrieves a direct download link to Arthur Danjou\'s professional resume in the specified language. Supports both English and French versions.',
|
||||
inputSchema: {
|
||||
lang: z.enum(['en', 'fr']).describe('The language for the resume: \'en\' for English or \'fr\' for French.')
|
||||
},
|
||||
handler: async ({ lang }) => {
|
||||
const base_url = import.meta.dev ? 'http://localhost:3000/api' : 'https://mcp.arthurdanjou.fr/api'
|
||||
const url = `${base_url}/resumes/${lang}`
|
||||
return {
|
||||
content: [{ type: 'text', text: JSON.stringify(url, null, 2) }]
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user