Skip to main content
Glama
by blizzy78
resources.js767 B
import { TaskIDSchema } from './tasks.js'; export async function handleReadResource(uri, taskDB) { if (!uri.startsWith('task://')) { throw new Error(`Invalid URI: ${uri}`); } const taskID = TaskIDSchema.parse(uri.substring(7)); const task = taskDB.get(taskID); if (!task) { throw new Error(`Task not found: ${taskID}`); } return { contents: [ { uri, name: task.taskID, title: task.title, description: task.description, mimeType: 'application/json', text: JSON.stringify(task), annotations: { audience: ['assistant'], }, }, ], }; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/blizzy78/mcp-task-manager'

If you have feedback or need assistance with the MCP directory API, please join our Discord server