Skip to main content
Glama

update_project

Modify existing project details in Things 3 task management app by updating title, notes, deadlines, tags, status, or other attributes using project ID.

Instructions

更新现有的项目。需要提供项目ID和授权令牌。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes项目的ID(必需)
authTokenNo授权令牌(如未提供,将使用环境变量THINGS_AUTH_TOKEN)
titleNo新标题
notesNo新备注(替换现有)
prependNotesNo在现有备注前添加
appendNotesNo在现有备注后添加
whenNo时间安排
deadlineNo截止日期
tagsNo标签(替换所有)
addTagsNo添加标签
areaIdNo区域ID
areaNo区域标题
completedNo完成状态
canceledNo取消状态
revealNo是否显示

Implementation Reference

  • The main handler function for executing the update_project tool. It validates the auth token, spreads args into params, builds the Things 'update-project' URL using buildThingsUrl, opens the URL to perform the update, and returns a success text response.
    async handleUpdateProject(args) {
      const authToken = args.authToken || DEFAULT_AUTH_TOKEN;
      if (!authToken) {
        throw new Error('需要授权令牌。请设置环境变量THINGS_AUTH_TOKEN或在参数中提供authToken');
      }
    
      const params = { ...args, authToken };
      const url = buildThingsUrl('update-project', params);
      await this.openThingsUrl(url);
    
      return {
        content: [
          {
            type: 'text',
            text: `✅ 项目更新命令已发送 (ID: ${args.id})`,
          },
        ],
      };
    }
  • src/index.js:248-317 (registration)
    Tool registration in the ListTools response, defining the name, description, and input schema (JSON Schema) for the update_project tool.
    {
      name: 'update_project',
      description: '更新现有的项目。需要提供项目ID和授权令牌。',
      inputSchema: {
        type: 'object',
        properties: {
          id: {
            type: 'string',
            description: '项目的ID(必需)',
          },
          authToken: {
            type: 'string',
            description: '授权令牌(如未提供,将使用环境变量THINGS_AUTH_TOKEN)',
          },
          title: {
            type: 'string',
            description: '新标题',
          },
          notes: {
            type: 'string',
            description: '新备注(替换现有)',
          },
          prependNotes: {
            type: 'string',
            description: '在现有备注前添加',
          },
          appendNotes: {
            type: 'string',
            description: '在现有备注后添加',
          },
          when: {
            type: 'string',
            description: '时间安排',
          },
          deadline: {
            type: 'string',
            description: '截止日期',
          },
          tags: {
            type: 'string',
            description: '标签(替换所有)',
          },
          addTags: {
            type: 'string',
            description: '添加标签',
          },
          areaId: {
            type: 'string',
            description: '区域ID',
          },
          area: {
            type: 'string',
            description: '区域标题',
          },
          completed: {
            type: 'boolean',
            description: '完成状态',
          },
          canceled: {
            type: 'boolean',
            description: '取消状态',
          },
          reveal: {
            type: 'boolean',
            description: '是否显示',
          },
        },
        required: ['id'],
      },
    },
  • src/index.js:433-434 (registration)
    Dispatch case in the CallToolRequest handler switch statement that routes update_project calls to the handleUpdateProject method.
    case 'update_project':
      return await this.handleUpdateProject(args);
  • Utility function used by the handler to construct the Things URL scheme for 'update-project' command with encoded parameters.
    export function buildThingsUrl(command, params = {}) {
      const baseUrl = `things:///${command}`;
      const queryString = buildQueryString(params);
    
      if (!queryString) {
        return baseUrl;
      }
    
      return `${baseUrl}?${queryString}`;
    }

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