Skip to main content
Glama
get-projects.ts654 B
import type { TodoistApi } from '@doist/todoist-api-typescript' import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js' import { getMaxPaginatedResults } from '../utils/get-max-paginated-results.js' export function registerGetProjects(server: McpServer, api: TodoistApi) { server.tool('get-projects', 'Get all projects from Todoist', {}, async () => { const projects = await getMaxPaginatedResults((params) => api.getProjects(params)) return { content: projects.map((project) => ({ type: 'text', text: JSON.stringify(project, null, 2), })), } }) }

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/Doist/todoist-mcp'

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