innov-mcp-tasks 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/index.mjs +44 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -52,6 +52,7 @@ Na raiz do repo existe [`.cursor/mcp.json`](../.cursor/mcp.json) com **dois** se
|
|
|
52
52
|
|
|
53
53
|
- `tasks_list` — opcional `project_id`
|
|
54
54
|
- `my_tasks` — tarefas do utilizador do token (endpoint “minhas” da API)
|
|
55
|
+
- `project_create` — cria projeto (`POST /api/v1/projects`)
|
|
55
56
|
- `task_get`, `task_create`, `task_update_status`, `task_assign`
|
|
56
57
|
|
|
57
58
|
## Publicar no npm (mantenedor)
|
package/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* MCP stdio — proxy para tarefas da API Innov (Sanctum Bearer).
|
|
3
|
+
* MCP stdio — proxy para projetos e tarefas da API Innov (Sanctum Bearer).
|
|
4
4
|
*/
|
|
5
5
|
import 'dotenv/config';
|
|
6
6
|
import { z } from 'zod';
|
|
@@ -105,6 +105,49 @@ server.registerTool(
|
|
|
105
105
|
},
|
|
106
106
|
);
|
|
107
107
|
|
|
108
|
+
server.registerTool(
|
|
109
|
+
'project_create',
|
|
110
|
+
{
|
|
111
|
+
description:
|
|
112
|
+
'Cria projeto (POST /projects). Corresponde a ProjectController::store: nome obrigatório; restantes opcionais.',
|
|
113
|
+
inputSchema: {
|
|
114
|
+
name: z.string().min(1).max(255),
|
|
115
|
+
description: z.string().optional(),
|
|
116
|
+
status: z
|
|
117
|
+
.enum(['planning', 'in_progress', 'on_hold', 'completed', 'cancelled'])
|
|
118
|
+
.optional(),
|
|
119
|
+
start_date: z.string().optional(),
|
|
120
|
+
end_date: z.string().optional(),
|
|
121
|
+
team_id: z.number().int().positive().optional(),
|
|
122
|
+
customer_id: z.number().int().positive().optional(),
|
|
123
|
+
is_private: z.boolean().optional(),
|
|
124
|
+
member_ids: z.array(z.number().int().positive()).optional(),
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
async (args) => {
|
|
128
|
+
try {
|
|
129
|
+
const body = {
|
|
130
|
+
name: args.name,
|
|
131
|
+
description: args.description ?? null,
|
|
132
|
+
status: args.status ?? null,
|
|
133
|
+
start_date: args.start_date ?? null,
|
|
134
|
+
end_date: args.end_date ?? null,
|
|
135
|
+
team_id: args.team_id ?? null,
|
|
136
|
+
customer_id: args.customer_id ?? null,
|
|
137
|
+
is_private: args.is_private ?? null,
|
|
138
|
+
member_ids: args.member_ids ?? null,
|
|
139
|
+
};
|
|
140
|
+
const data = await apiFetch('/api/v1/projects', {
|
|
141
|
+
method: 'POST',
|
|
142
|
+
body: JSON.stringify(body),
|
|
143
|
+
});
|
|
144
|
+
return jsonText(data);
|
|
145
|
+
} catch (e) {
|
|
146
|
+
return jsonError(e instanceof Error ? e.message : String(e));
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
);
|
|
150
|
+
|
|
108
151
|
server.registerTool(
|
|
109
152
|
'task_create',
|
|
110
153
|
{
|