mcp-pachca 0.4.0 → 0.5.2

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.
@@ -1,195 +0,0 @@
1
- import type { Tool } from "@modelcontextprotocol/sdk/types.js";
2
-
3
- export const toolDefinitions: Tool[] = [
4
- {
5
- name: "pachca_search_users",
6
- description:
7
- "Search for users in Pachca by name or email. Returns matching users with cursor-based pagination.",
8
- inputSchema: {
9
- type: "object" as const,
10
- properties: {
11
- query: {
12
- type: "string",
13
- description: "Search query (name or email)",
14
- },
15
- cursor: {
16
- type: "string",
17
- description: "Pagination cursor from previous response",
18
- },
19
- },
20
- required: ["query"],
21
- },
22
- },
23
- {
24
- name: "pachca_get_user",
25
- description: "Get a single user by ID.",
26
- inputSchema: {
27
- type: "object" as const,
28
- properties: {
29
- id: { type: "number", description: "User ID" },
30
- },
31
- required: ["id"],
32
- },
33
- },
34
- {
35
- name: "pachca_list_chats",
36
- description:
37
- "List chats organized by folder. First call without folder to see available folders, then specify a folder kind to list its chats.",
38
- inputSchema: {
39
- type: "object" as const,
40
- properties: {
41
- folder: {
42
- type: "string",
43
- enum: ["pinned", "team", "personal"],
44
- description:
45
- "Folder kind to list chats from. Omit to get the list of available folders.",
46
- },
47
- cursor: {
48
- type: "string",
49
- description: "Pagination cursor from previous response",
50
- },
51
- },
52
- },
53
- },
54
- {
55
- name: "pachca_get_chat",
56
- description: "Get a single chat by ID.",
57
- inputSchema: {
58
- type: "object" as const,
59
- properties: {
60
- id: { type: "number", description: "Chat ID" },
61
- },
62
- required: ["id"],
63
- },
64
- },
65
- {
66
- name: "pachca_get_chat_members",
67
- description: "Get members of a chat.",
68
- inputSchema: {
69
- type: "object" as const,
70
- properties: {
71
- id: { type: "number", description: "Chat ID" },
72
- limit: {
73
- type: "number",
74
- description: "Max results per page (default 30)",
75
- },
76
- cursor: {
77
- type: "string",
78
- description: "Pagination cursor from previous response",
79
- },
80
- },
81
- required: ["id"],
82
- },
83
- },
84
- {
85
- name: "pachca_list_messages",
86
- description:
87
- "List messages in a chat. Uses anchor-based pagination: provide message_id + direction to page through history.",
88
- inputSchema: {
89
- type: "object" as const,
90
- properties: {
91
- chat_id: { type: "number", description: "Chat ID" },
92
- per: {
93
- type: "number",
94
- description: "Messages per page (default 30)",
95
- },
96
- message_id: {
97
- type: "number",
98
- description: "Anchor message ID for pagination",
99
- },
100
- direction: {
101
- type: "string",
102
- enum: ["before", "after", "around"],
103
- description: "Pagination direction relative to message_id",
104
- },
105
- },
106
- required: ["chat_id"],
107
- },
108
- },
109
- {
110
- name: "pachca_get_message",
111
- description: "Get a single message by ID.",
112
- inputSchema: {
113
- type: "object" as const,
114
- properties: {
115
- id: { type: "number", description: "Message ID" },
116
- },
117
- required: ["id"],
118
- },
119
- },
120
- {
121
- name: "pachca_send_message",
122
- description: "Send a message to a chat in Pachca.",
123
- inputSchema: {
124
- type: "object" as const,
125
- properties: {
126
- chat_id: { type: "number", description: "Chat ID to send message to" },
127
- text: { type: "string", description: "Message text" },
128
- parent_message_id: {
129
- type: "number",
130
- description: "Reply to a specific message ID",
131
- },
132
- },
133
- required: ["chat_id", "text"],
134
- },
135
- },
136
- {
137
- name: "pachca_search",
138
- description:
139
- "Full-text search for messages across all chats. Returns matching messages with cursor-based pagination.",
140
- inputSchema: {
141
- type: "object" as const,
142
- properties: {
143
- query: { type: "string", description: "Search query" },
144
- cursor: {
145
- type: "string",
146
- description: "Pagination cursor from previous response",
147
- },
148
- },
149
- required: ["query"],
150
- },
151
- },
152
- {
153
- name: "pachca_get_profile",
154
- description: 'Get the current authenticated user\'s profile ("who am I").',
155
- inputSchema: {
156
- type: "object" as const,
157
- properties: {},
158
- },
159
- },
160
- {
161
- name: "pachca_get_unread",
162
- description: "Get list of chat IDs that have unread messages.",
163
- inputSchema: {
164
- type: "object" as const,
165
- properties: {},
166
- },
167
- },
168
- {
169
- name: "pachca_get_presence",
170
- description: "Get online/offline status for one or more users.",
171
- inputSchema: {
172
- type: "object" as const,
173
- properties: {
174
- ids: {
175
- type: "array",
176
- items: { type: "number" },
177
- description: "User IDs to check presence for",
178
- },
179
- },
180
- required: ["ids"],
181
- },
182
- },
183
- {
184
- name: "pachca_get_personal_chat",
185
- description:
186
- "Resolve a user ID to their personal (DM) chat ID. Use this before sending a direct message to a user.",
187
- inputSchema: {
188
- type: "object" as const,
189
- properties: {
190
- id: { type: "number", description: "User ID" },
191
- },
192
- required: ["id"],
193
- },
194
- },
195
- ];
@@ -1,127 +0,0 @@
1
- export interface PachcaUser {
2
- id: number;
3
- name: string;
4
- display_name: string;
5
- last_name: string;
6
- email: string;
7
- avatar_color: string;
8
- company_role: string | null;
9
- department: string | null;
10
- title: string | null;
11
- role: string;
12
- suspended: boolean;
13
- bot: boolean;
14
- last_seen: string | null;
15
- time_zone: string;
16
- image_url: string | null;
17
- }
18
-
19
- export interface PachcaChat {
20
- id: number;
21
- name: string;
22
- token: string;
23
- chat_subtype: string | null;
24
- channel: boolean;
25
- personal: boolean;
26
- public: boolean;
27
- is_member: boolean;
28
- personal_interlocutor: number | null;
29
- avatar_color: string | null;
30
- avatar_url: string | null;
31
- workspace_id: number;
32
- last_message_at: string | null;
33
- created_at: string;
34
- meet_room_url: string | null;
35
- }
36
-
37
- export interface PachcaMessage {
38
- id: number;
39
- uuid: string;
40
- text: string;
41
- markup: string | null;
42
- kind: string;
43
- user_id: number;
44
- chat_id: number;
45
- created_at: string;
46
- updated_at: string | null;
47
- pinned: boolean;
48
- important: boolean;
49
- thread_id: number | null;
50
- thread_message_count: number;
51
- parent_message_id: number | null;
52
- reactions: PachcaReaction[];
53
- files: PachcaFile[];
54
- link_previews: PachcaLinkPreview[];
55
- }
56
-
57
- export interface PachcaReaction {
58
- code: string;
59
- user_ids: number[];
60
- }
61
-
62
- export interface PachcaFile {
63
- id: number;
64
- key: string;
65
- name: string;
66
- file_type: string;
67
- url: string;
68
- }
69
-
70
- export interface PachcaLinkPreview {
71
- url: string;
72
- title: string | null;
73
- description: string | null;
74
- image_url: string | null;
75
- }
76
-
77
- export interface PachcaThread {
78
- id: number;
79
- chat_id: number;
80
- message_id: number;
81
- message_chat_id: number;
82
- updated_at: string;
83
- }
84
-
85
- export interface PachcaFolder {
86
- id: number;
87
- title: string;
88
- kind: "pinned" | "team" | "personal";
89
- }
90
-
91
- export interface PachcaPaginate {
92
- cursor: string | null;
93
- has_next: boolean;
94
- }
95
-
96
- export interface PachcaSearchResult<T> {
97
- records: T[];
98
- paginate: PachcaPaginate;
99
- }
100
-
101
- export interface PachcaPresence {
102
- id: number;
103
- status: "online" | "offline";
104
- }
105
-
106
- export interface PachcaReadInfo {
107
- id: number;
108
- unread_message_counter: number;
109
- unread: boolean;
110
- mentioned: boolean;
111
- last_read_message_id: number | null;
112
- last_message_id: number | null;
113
- }
114
-
115
- export interface PachcaProfile {
116
- id: number;
117
- name: string;
118
- display_name: string;
119
- last_name: string;
120
- email: string;
121
- avatar_color: string;
122
- company_role: string | null;
123
- department: string | null;
124
- title: string | null;
125
- time_zone: string;
126
- image_url: string | null;
127
- }
package/tsconfig.json DELETED
@@ -1,19 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2022",
4
- "module": "Node16",
5
- "moduleResolution": "Node16",
6
- "lib": ["ES2022"],
7
- "strict": true,
8
- "esModuleInterop": true,
9
- "skipLibCheck": true,
10
- "forceConsistentCasingInFileNames": true,
11
- "resolveJsonModule": true,
12
- "declaration": true,
13
- "sourceMap": true,
14
- "isolatedModules": true,
15
- "outDir": "dist",
16
- "rootDir": "src"
17
- },
18
- "include": ["src"]
19
- }