Add API endpoints for content and update MCP resources to use them

Co-authored-by: ArthurDanjou <29738535+ArthurDanjou@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-11-30 14:44:52 +00:00
parent 377cab77ed
commit f6ab805ef3
18 changed files with 109 additions and 80 deletions

View File

@@ -3,18 +3,14 @@ export default defineMcpResource({
description: 'A comprehensive list of technical skills, programming languages, frameworks, and tools mastered by Arthur Danjou',
cache: '1 hour',
uri: 'resource://artmcp/skills',
handler: async () => {
const event = useEvent()
const result = await queryCollection(event, 'skills')
.where('extension', '=', 'json')
.first()
handler: async (uri: URL) => {
const result = await $fetch('/api/skills')
return {
contents: [{
uri: result.path,
uri: uri.toString(),
mimeType: 'text/json',
text: JSON.stringify(result.body, null, 2)
text: JSON.stringify(result, null, 2)
}]
}
}