Skip to main content
Glama

delete_project

Remove projects from your Things 3 task management system by marking them as canceled using the project ID.

Instructions

删除项目(通过将其标记为已取消)。需要提供项目ID和授权令牌。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes项目的ID(必需)
authTokenNo授权令牌(如未提供,将使用环境变量THINGS_AUTH_TOKEN)

Implementation Reference

  • The handler function that implements the delete_project tool logic. It constructs a Things URL scheme to update the project by setting it as canceled (effectively deleting it) and opens the URL.
    async handleDeleteProject(args) { const authToken = args.authToken || DEFAULT_AUTH_TOKEN; if (!authToken) { throw new Error('需要授权令牌。请设置环境变量THINGS_AUTH_TOKEN或在参数中提供authToken'); } // 通过将 canceled 设为 true 来实现删除效果 const params = { id: args.id, authToken, canceled: true, }; const url = buildThingsUrl('update-project', params); await this.openThingsUrl(url); return { content: [ { type: 'text', text: `🗑️ 项目已删除 (ID: ${args.id})`, }, ], }; }
  • src/index.js:400-417 (registration)
    Registration of the 'delete_project' tool in the ListToolsRequestSchema handler, including the tool name, description, and input schema definition.
    { name: 'delete_project', description: '删除项目(通过将其标记为已取消)。需要提供项目ID和授权令牌。', inputSchema: { type: 'object', properties: { id: { type: 'string', description: '项目的ID(必需)', }, authToken: { type: 'string', description: '授权令牌(如未提供,将使用环境变量THINGS_AUTH_TOKEN)', }, }, required: ['id'], }, },
  • Input schema definition for the delete_project tool, specifying required 'id' parameter and optional 'authToken'.
    inputSchema: { type: 'object', properties: { id: { type: 'string', description: '项目的ID(必需)', }, authToken: { type: 'string', description: '授权令牌(如未提供,将使用环境变量THINGS_AUTH_TOKEN)', }, }, required: ['id'], },
  • Dispatch case in the CallToolRequestSchema handler that routes 'delete_project' calls to the handleDeleteProject method.
    case 'delete_project': return await this.handleDeleteProject(args);

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/Mieluoxxx/things_mcp'

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