mirror of
https://github.com/ArthurDanjou/artmcp.git
synced 2026-01-14 16:44:23 +01:00
- 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.
22 lines
808 B
TypeScript
22 lines
808 B
TypeScript
import z from 'zod'
|
|
|
|
export default defineMcpTool({
|
|
description: 'Retrieves a filtered list of tools, software, and hardware used by Arthur Danjou based on a specific category. Available categories: homelab, IDE, hardware, and software.',
|
|
inputSchema: {
|
|
categoryName: z.enum(['homelab', 'ide', 'hardware', 'software']).describe('The category to filter by: \'homelab\', \'ide\', \'hardware\', or \'software\'.')
|
|
},
|
|
handler: async ({ categoryName }) => {
|
|
const event = useEvent()
|
|
|
|
const result = await queryCollection(event, 'uses')
|
|
.where('extension', '=', 'md')
|
|
.where('category', '=', categoryName)
|
|
.all()
|
|
|
|
return {
|
|
content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
|
|
structuredContent: result as { [key: string]: unknown }
|
|
}
|
|
}
|
|
})
|