-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtodo.json
More file actions
122 lines (122 loc) · 3.58 KB
/
Copy pathtodo.json
File metadata and controls
122 lines (122 loc) · 3.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
{
"name": "Todo",
"access": {
"anon": "Cannot read or write personal todos.",
"user": "Can only manage their own todos.",
"admin": "Has no ordinary page capability to independently manage other users' todos.",
"agent": "After authorization, can only read and write the current user's own todos; both REST and MCP currently provide this capability."
},
"rules": {
"purely-personal": "Todo is a purely personal object and is not bound to any section.",
"due-date-calendar": "Only incomplete todos with a due date appear in the calendar.",
"completed-retained": "Completed todos retain history but no longer occupy urgent information areas."
},
"capabilities": {
"todo-list": {
"title": "Todo List & Filter",
"auth": "user",
"links": {
"models": ["Todo"]
},
"web": {
"pages": ["/?tab=todos"]
},
"rest": {
"routes": [
{
"path": "/api/todos",
"returns": "{ todos: TodoItem[] }",
"notes": [
"Returns todos[]; each item contains id, title, content, completed, priority, dueAt, createdAt, and updatedAt."
]
}
]
},
"mcp": {
"tools": [
{
"name": "list_my_todos",
"returns": "{ counts: { incomplete: Int, completed: Int, overdue: Int }, todos: TodoItem[] }",
"rest_equivalent": "GET /api/todos",
"notes": [
"Default parameters: includeCompleted=false, limit=50.",
"Incomplete items are returned first; completed items are excluded unless includeCompleted=true."
]
}
]
},
"display": {
"fields": [
"todo.title",
"todo.content (description)",
"todo.priority",
"todo.dueAt",
"completed status action button",
"filter: incomplete/completed/all"
]
}
},
"todo-edit": {
"title": "Todo Edit Sheet",
"auth": "user",
"links": {
"models": ["Todo"]
},
"web": {
"pages": ["/?tab=todos"]
},
"rest": {
"routes": [
{
"path": "/api/todos",
"method": "POST",
"returns": "{ id: String }"
},
{
"path": "/api/todos/[id]",
"method": "PATCH",
"returns": "{ success: Boolean }"
},
{
"path": "/api/todos/[id]",
"method": "DELETE",
"returns": "{ success: Boolean }"
}
]
},
"mcp": {
"tools": [
{
"name": "create_my_todo",
"returns": "{ success: Boolean, id: String }",
"rest_equivalent": "POST /api/todos"
},
{
"name": "update_my_todo",
"returns": "{ success: Boolean, todo: TodoItem }",
"rest_equivalent": "PATCH /api/todos/[id]",
"notes": [
"Returns the updated todo snapshot so callers can confirm the applied changes without an extra read."
]
},
{
"name": "delete_my_todo",
"returns": "{ success: Boolean }",
"rest_equivalent": "DELETE /api/todos/[id]"
}
]
},
"display": {
"fields": [
"todo.title (text input)",
"todo.content (text/markdown input)",
"todo.priority (select)",
"todo.dueAt (date/time picker)",
"Save button",
"Delete button (edit mode)",
"Cancel button"
]
}
}
}
}