mirror of
https://github.com/ArthurDanjou/artmcp.git
synced 2026-01-14 14:34:22 +01:00
Add social links resource and update README with comprehensive documentation
Co-authored-by: ArthurDanjou <29738535+ArthurDanjou@users.noreply.github.com>
This commit is contained in:
10
server/api/socials.get.ts
Normal file
10
server/api/socials.get.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { queryCollection } from '@nuxt/content/server'
|
||||
|
||||
export default defineCachedEventHandler(async (event) => {
|
||||
return await queryCollection(event, 'socials')
|
||||
.where('extension', '=', 'json')
|
||||
.first()
|
||||
}, {
|
||||
name: 'socials-list',
|
||||
maxAge: 3600 // 1 hour
|
||||
})
|
||||
@@ -256,6 +256,25 @@ function createServer() {
|
||||
}
|
||||
)
|
||||
|
||||
server.registerResource(
|
||||
'artmcp-socials',
|
||||
'resource://artmcp/socials',
|
||||
{
|
||||
title: 'ArtMCP Social Links',
|
||||
description: 'Get social media profiles and online presence of Arthur Danjou'
|
||||
},
|
||||
async (uri) => {
|
||||
const result = await $fetch('/api/socials')
|
||||
return {
|
||||
contents: [{
|
||||
uri: uri.href,
|
||||
mimeType: 'application/json',
|
||||
text: JSON.stringify(result, null, 2)
|
||||
}]
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
// Tools
|
||||
server.registerTool(
|
||||
'get_resume_link',
|
||||
@@ -534,6 +553,25 @@ function createServer() {
|
||||
}
|
||||
)
|
||||
|
||||
server.registerPrompt(
|
||||
'artmcp-socials',
|
||||
{
|
||||
title: 'Get Social Media Links of Arthur Danjou',
|
||||
description: 'Get social media profiles and online presence'
|
||||
},
|
||||
async () => {
|
||||
return {
|
||||
messages: [{
|
||||
role: 'user',
|
||||
content: {
|
||||
type: 'text',
|
||||
text: `What are Arthur Danjou's social media profiles and online presence?`
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
return server
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user