@tacitai/mcp-server 0.1.1 → 0.3.0

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.
Files changed (70) hide show
  1. package/dist/auth.d.ts +32 -0
  2. package/dist/auth.js +64 -0
  3. package/dist/client.d.ts +60 -5
  4. package/dist/client.js +234 -53
  5. package/dist/index.js +130 -106
  6. package/dist/oauth.d.ts +115 -0
  7. package/dist/oauth.js +619 -0
  8. package/dist/prompts.d.ts +2 -0
  9. package/dist/prompts.js +12 -0
  10. package/dist/setup.d.ts +28 -5
  11. package/dist/setup.js +266 -59
  12. package/dist/tools/agents.d.ts +277 -0
  13. package/dist/tools/agents.js +335 -0
  14. package/dist/tools/annotations.d.ts +117 -0
  15. package/dist/tools/annotations.js +130 -0
  16. package/dist/tools/artifacts.d.ts +178 -8
  17. package/dist/tools/artifacts.js +372 -81
  18. package/dist/tools/chronicle.d.ts +3 -0
  19. package/dist/tools/chronicle.js +165 -0
  20. package/dist/tools/connector_write_back.d.ts +3 -0
  21. package/dist/tools/connector_write_back.js +27 -0
  22. package/dist/tools/converse.d.ts +10 -0
  23. package/dist/tools/converse.js +88 -0
  24. package/dist/tools/crews.d.ts +3 -0
  25. package/dist/tools/crews.js +115 -0
  26. package/dist/tools/drafts.d.ts +83 -0
  27. package/dist/tools/drafts.js +86 -0
  28. package/dist/tools/errors.d.ts +15 -0
  29. package/dist/tools/errors.js +21 -0
  30. package/dist/tools/export.d.ts +54 -0
  31. package/dist/tools/export.js +55 -0
  32. package/dist/tools/gm.d.ts +214 -0
  33. package/dist/tools/gm.js +198 -0
  34. package/dist/tools/ingest.d.ts +58 -4
  35. package/dist/tools/ingest.js +109 -76
  36. package/dist/tools/kb.d.ts +544 -0
  37. package/dist/tools/kb.js +687 -0
  38. package/dist/tools/lake-structure.d.ts +3 -0
  39. package/dist/tools/lake-structure.js +126 -0
  40. package/dist/tools/lake.d.ts +932 -0
  41. package/dist/tools/lake.js +1017 -0
  42. package/dist/tools/move.d.ts +200 -0
  43. package/dist/tools/move.js +96 -0
  44. package/dist/tools/outbox.d.ts +274 -0
  45. package/dist/tools/outbox.js +223 -0
  46. package/dist/tools/people.d.ts +3 -0
  47. package/dist/tools/people.js +59 -0
  48. package/dist/tools/pyramid.d.ts +554 -0
  49. package/dist/tools/pyramid.js +758 -0
  50. package/dist/tools/recall.d.ts +2 -0
  51. package/dist/tools/recall.js +28 -17
  52. package/dist/tools/registry.d.ts +17 -0
  53. package/dist/tools/registry.js +199 -0
  54. package/dist/tools/research.d.ts +47 -0
  55. package/dist/tools/research.js +575 -0
  56. package/dist/tools/search.d.ts +9 -0
  57. package/dist/tools/search.js +86 -25
  58. package/dist/tools/sharing.d.ts +63 -0
  59. package/dist/tools/sharing.js +157 -0
  60. package/dist/tools/skills.d.ts +9 -0
  61. package/dist/tools/skills.js +98 -0
  62. package/dist/tools/synthesize.d.ts +54 -2
  63. package/dist/tools/synthesize.js +80 -23
  64. package/dist/tools/web-url.d.ts +57 -0
  65. package/dist/tools/web-url.js +74 -0
  66. package/dist/tools/workspaces.d.ts +3 -0
  67. package/dist/tools/workspaces.js +47 -0
  68. package/dist/transport.d.ts +9 -0
  69. package/dist/transport.js +209 -0
  70. package/package.json +5 -4
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Export tool:
3
+ * tacit_export_to_git — POST /api/v1/export/git
4
+ */
5
+ import { z } from 'zod';
6
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
7
+ import { TacitClient } from '../client.js';
8
+ export interface ToolRequest {
9
+ execute(): Promise<{
10
+ content: Array<{
11
+ type: 'text';
12
+ text: string;
13
+ }>;
14
+ isError?: boolean;
15
+ }>;
16
+ }
17
+ export declare const exportToGitInputSchema: z.ZodObject<{
18
+ artifact_id: z.ZodString;
19
+ output_path: z.ZodString;
20
+ }, "strip", z.ZodTypeAny, {
21
+ artifact_id: string;
22
+ output_path: string;
23
+ }, {
24
+ artifact_id: string;
25
+ output_path: string;
26
+ }>;
27
+ export type ExportToGitInput = z.infer<typeof exportToGitInputSchema>;
28
+ export declare const EXPORT_TO_GIT_TOOL_DEF: {
29
+ name: "tacit_export_to_git";
30
+ description: string;
31
+ inputSchema: {
32
+ type: "object";
33
+ properties: {
34
+ artifact_id: {
35
+ type: string;
36
+ description: string;
37
+ };
38
+ output_path: {
39
+ type: string;
40
+ description: string;
41
+ };
42
+ };
43
+ required: string[];
44
+ };
45
+ };
46
+ export declare function buildExportToGitRequest(client: TacitClient, input: ExportToGitInput): ToolRequest;
47
+ export declare function handleExportToGit(args: unknown): Promise<{
48
+ content: Array<{
49
+ type: 'text';
50
+ text: string;
51
+ }>;
52
+ isError?: boolean;
53
+ }>;
54
+ export declare function registerExportTools(server: McpServer, getClientFn: () => Promise<TacitClient>): void;
@@ -0,0 +1,55 @@
1
+ // SPDX-License-Identifier: MIT
2
+ /**
3
+ * Export tool:
4
+ * tacit_export_to_git — POST /api/v1/export/git
5
+ */
6
+ import { z } from 'zod';
7
+ import { getClient } from '../client.js';
8
+ import { apiErrorResult } from './errors.js';
9
+ export const exportToGitInputSchema = z.object({
10
+ artifact_id: z.string().min(1).describe('Artifact UUID to export'),
11
+ output_path: z.string().min(1).describe('Local file path to export the artifact content to'),
12
+ });
13
+ export const EXPORT_TO_GIT_TOOL_DEF = {
14
+ name: 'tacit_export_to_git',
15
+ description: "Export an artifact's content to a local file path. Route: POST /api/v1/export/git.",
16
+ inputSchema: {
17
+ type: 'object',
18
+ properties: {
19
+ artifact_id: { type: 'string', description: 'Artifact UUID' },
20
+ output_path: { type: 'string', description: 'Local file path to export to' },
21
+ },
22
+ required: ['artifact_id', 'output_path'],
23
+ },
24
+ };
25
+ export function buildExportToGitRequest(client, input) {
26
+ return {
27
+ async execute() {
28
+ const { artifact_id, output_path } = input;
29
+ try {
30
+ const body = { artifact_id, output_path };
31
+ const result = await client.post('/api/v1/export/git', body);
32
+ return { content: [{ type: 'text', text: JSON.stringify(result) }] };
33
+ }
34
+ catch (err) {
35
+ return apiErrorResult(err, '/api/v1/export/git');
36
+ }
37
+ },
38
+ };
39
+ }
40
+ export async function handleExportToGit(args) {
41
+ const parsed = exportToGitInputSchema.safeParse(args);
42
+ if (!parsed.success) {
43
+ return { content: [{ type: 'text', text: `Invalid input: ${parsed.error.message}` }], isError: true };
44
+ }
45
+ return buildExportToGitRequest(getClient(), parsed.data).execute();
46
+ }
47
+ export function registerExportTools(server, getClientFn) {
48
+ server.tool('tacit_export_to_git', "Export an artifact's content to a local file path. Route: POST /api/v1/export/git.", {
49
+ artifact_id: z.string().min(1).describe('Artifact UUID to export'),
50
+ output_path: z.string().min(1).describe('Local file path to export to'),
51
+ }, async (args) => {
52
+ const client = await getClientFn();
53
+ return buildExportToGitRequest(client, args).execute();
54
+ });
55
+ }
@@ -0,0 +1,214 @@
1
+ /**
2
+ * GM (Gateway Manager) tools — unified content ingestion with classification
3
+ * and human-approved placement across lake, KB, and pyramid surfaces.
4
+ *
5
+ * Routes (Axum, all under /api/v1/gm):
6
+ * POST /ingest — ingest content, classify, propose placement
7
+ * POST /approve — approve placement targets for a catalog entry
8
+ */
9
+ import { z } from 'zod';
10
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
11
+ import { TacitClient } from '../client.js';
12
+ export interface ToolRequest {
13
+ execute(): Promise<{
14
+ content: Array<{
15
+ type: 'text';
16
+ text: string;
17
+ }>;
18
+ isError?: boolean;
19
+ }>;
20
+ }
21
+ export declare const gmIngestInputSchema: z.ZodObject<{
22
+ content: z.ZodString;
23
+ title: z.ZodString;
24
+ source_uri: z.ZodOptional<z.ZodString>;
25
+ content_type: z.ZodOptional<z.ZodString>;
26
+ classification_hints: z.ZodOptional<z.ZodObject<{
27
+ domain: z.ZodOptional<z.ZodString>;
28
+ content_type: z.ZodOptional<z.ZodString>;
29
+ }, "strip", z.ZodTypeAny, {
30
+ domain?: string | undefined;
31
+ content_type?: string | undefined;
32
+ }, {
33
+ domain?: string | undefined;
34
+ content_type?: string | undefined;
35
+ }>>;
36
+ }, "strip", z.ZodTypeAny, {
37
+ content: string;
38
+ title: string;
39
+ source_uri?: string | undefined;
40
+ content_type?: string | undefined;
41
+ classification_hints?: {
42
+ domain?: string | undefined;
43
+ content_type?: string | undefined;
44
+ } | undefined;
45
+ }, {
46
+ content: string;
47
+ title: string;
48
+ source_uri?: string | undefined;
49
+ content_type?: string | undefined;
50
+ classification_hints?: {
51
+ domain?: string | undefined;
52
+ content_type?: string | undefined;
53
+ } | undefined;
54
+ }>;
55
+ export type GmIngestInput = z.infer<typeof gmIngestInputSchema>;
56
+ export declare const GM_INGEST_TOOL_DEF: {
57
+ name: "tacit_gm_ingest";
58
+ description: string;
59
+ inputSchema: {
60
+ type: "object";
61
+ properties: {
62
+ content: {
63
+ type: string;
64
+ description: string;
65
+ };
66
+ title: {
67
+ type: string;
68
+ description: string;
69
+ };
70
+ source_uri: {
71
+ type: string;
72
+ description: string;
73
+ };
74
+ content_type: {
75
+ type: string;
76
+ description: string;
77
+ };
78
+ classification_hints: {
79
+ type: string;
80
+ properties: {
81
+ domain: {
82
+ type: string;
83
+ };
84
+ content_type: {
85
+ type: string;
86
+ };
87
+ };
88
+ description: string;
89
+ };
90
+ };
91
+ required: string[];
92
+ };
93
+ };
94
+ export declare function buildGmIngestRequest(client: TacitClient, input: GmIngestInput): ToolRequest;
95
+ export declare function handleGmIngest(args: unknown): Promise<{
96
+ content: Array<{
97
+ type: 'text';
98
+ text: string;
99
+ }>;
100
+ isError?: boolean;
101
+ }>;
102
+ export declare const gmApproveInputSchema: z.ZodObject<{
103
+ catalog_id: z.ZodString;
104
+ approved_targets: z.ZodArray<z.ZodObject<{
105
+ surface: z.ZodEnum<["kb", "pyramid"]>;
106
+ collection_or_program: z.ZodOptional<z.ZodString>;
107
+ dossier_id: z.ZodOptional<z.ZodString>;
108
+ }, "strip", z.ZodTypeAny, {
109
+ surface: "kb" | "pyramid";
110
+ dossier_id?: string | undefined;
111
+ collection_or_program?: string | undefined;
112
+ }, {
113
+ surface: "kb" | "pyramid";
114
+ dossier_id?: string | undefined;
115
+ collection_or_program?: string | undefined;
116
+ }>, "many">;
117
+ rejected_targets: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
118
+ surface: z.ZodString;
119
+ reason: z.ZodOptional<z.ZodString>;
120
+ }, "strip", z.ZodTypeAny, {
121
+ surface: string;
122
+ reason?: string | undefined;
123
+ }, {
124
+ surface: string;
125
+ reason?: string | undefined;
126
+ }>, "many">>>;
127
+ }, "strip", z.ZodTypeAny, {
128
+ catalog_id: string;
129
+ approved_targets: {
130
+ surface: "kb" | "pyramid";
131
+ dossier_id?: string | undefined;
132
+ collection_or_program?: string | undefined;
133
+ }[];
134
+ rejected_targets: {
135
+ surface: string;
136
+ reason?: string | undefined;
137
+ }[];
138
+ }, {
139
+ catalog_id: string;
140
+ approved_targets: {
141
+ surface: "kb" | "pyramid";
142
+ dossier_id?: string | undefined;
143
+ collection_or_program?: string | undefined;
144
+ }[];
145
+ rejected_targets?: {
146
+ surface: string;
147
+ reason?: string | undefined;
148
+ }[] | undefined;
149
+ }>;
150
+ export type GmApproveInput = z.infer<typeof gmApproveInputSchema>;
151
+ export declare const GM_APPROVE_TOOL_DEF: {
152
+ name: "tacit_gm_approve";
153
+ description: string;
154
+ inputSchema: {
155
+ type: "object";
156
+ properties: {
157
+ catalog_id: {
158
+ type: string;
159
+ description: string;
160
+ };
161
+ approved_targets: {
162
+ type: string;
163
+ items: {
164
+ type: string;
165
+ properties: {
166
+ surface: {
167
+ type: string;
168
+ enum: string[];
169
+ description: string;
170
+ };
171
+ collection_or_program: {
172
+ type: string;
173
+ description: string;
174
+ };
175
+ dossier_id: {
176
+ type: string;
177
+ description: string;
178
+ };
179
+ };
180
+ required: string[];
181
+ };
182
+ description: string;
183
+ };
184
+ rejected_targets: {
185
+ type: string;
186
+ items: {
187
+ type: string;
188
+ properties: {
189
+ surface: {
190
+ type: string;
191
+ description: string;
192
+ };
193
+ reason: {
194
+ type: string;
195
+ description: string;
196
+ };
197
+ };
198
+ required: string[];
199
+ };
200
+ description: string;
201
+ };
202
+ };
203
+ required: string[];
204
+ };
205
+ };
206
+ export declare function buildGmApproveRequest(client: TacitClient, input: GmApproveInput): ToolRequest;
207
+ export declare function handleGmApprove(args: unknown): Promise<{
208
+ content: Array<{
209
+ type: 'text';
210
+ text: string;
211
+ }>;
212
+ isError?: boolean;
213
+ }>;
214
+ export declare function registerGmTools(server: McpServer, getClientFn: () => Promise<TacitClient>): void;
@@ -0,0 +1,198 @@
1
+ // SPDX-License-Identifier: MIT
2
+ /**
3
+ * GM (Gateway Manager) tools — unified content ingestion with classification
4
+ * and human-approved placement across lake, KB, and pyramid surfaces.
5
+ *
6
+ * Routes (Axum, all under /api/v1/gm):
7
+ * POST /ingest — ingest content, classify, propose placement
8
+ * POST /approve — approve placement targets for a catalog entry
9
+ */
10
+ import { z } from 'zod';
11
+ import { TacitClient, TacitApiError, TokenExpiredError } from '../client.js';
12
+ function apiErrorResult(err, toolName) {
13
+ if (err instanceof TokenExpiredError) {
14
+ return {
15
+ content: [{ type: 'text', text: err.message }],
16
+ isError: true,
17
+ };
18
+ }
19
+ if (err instanceof TacitApiError) {
20
+ return { content: [{ type: 'text', text: `API error ${err.statusCode} on ${toolName}: ${err.body}` }], isError: true };
21
+ }
22
+ const msg = err instanceof Error ? err.message : String(err);
23
+ return { content: [{ type: 'text', text: `Error: ${msg}` }], isError: true };
24
+ }
25
+ // ─── tacit_gm_ingest ────────────────────────────────────────────────────────
26
+ export const gmIngestInputSchema = z.object({
27
+ content: z.string().min(1).describe('The content to ingest'),
28
+ title: z.string().min(1).describe('Title for the catalog entry'),
29
+ source_uri: z.string().optional().describe('Source URI (defaults to tacit://adhoc/<uuid>)'),
30
+ content_type: z.string().optional().describe('Content type (auto-detected if omitted)'),
31
+ classification_hints: z.object({
32
+ domain: z.string().optional(),
33
+ content_type: z.string().optional(),
34
+ }).optional().describe('Optional hints for the classifier'),
35
+ });
36
+ export const GM_INGEST_TOOL_DEF = {
37
+ name: 'tacit_gm_ingest',
38
+ description: 'Ingest content through the unified gateway manager. Classifies the content, creates a catalog entry and artifact, ' +
39
+ 'and returns a placement proposal with suggested targets (KB, pyramid, or lake-only). ' +
40
+ 'Route: POST /api/v1/gm/ingest.',
41
+ inputSchema: {
42
+ type: 'object',
43
+ properties: {
44
+ content: { type: 'string', description: 'The content to ingest' },
45
+ title: { type: 'string', description: 'Title for the catalog entry' },
46
+ source_uri: { type: 'string', description: 'Source URI (defaults to tacit://adhoc/<uuid>)' },
47
+ content_type: { type: 'string', description: 'Content type (auto-detected if omitted)' },
48
+ classification_hints: {
49
+ type: 'object',
50
+ properties: {
51
+ domain: { type: 'string' },
52
+ content_type: { type: 'string' },
53
+ },
54
+ description: 'Optional hints for the classifier',
55
+ },
56
+ },
57
+ required: ['content', 'title'],
58
+ },
59
+ };
60
+ export function buildGmIngestRequest(client, input) {
61
+ return {
62
+ async execute() {
63
+ try {
64
+ const body = {
65
+ content: input.content,
66
+ title: input.title,
67
+ };
68
+ if (input.source_uri !== undefined)
69
+ body['source_uri'] = input.source_uri;
70
+ if (input.content_type !== undefined)
71
+ body['content_type'] = input.content_type;
72
+ if (input.classification_hints !== undefined)
73
+ body['classification_hints'] = input.classification_hints;
74
+ const result = await client.post('/api/v1/gm/ingest', body);
75
+ return { content: [{ type: 'text', text: JSON.stringify(result) }] };
76
+ }
77
+ catch (err) {
78
+ return apiErrorResult(err, 'tacit_gm_ingest');
79
+ }
80
+ },
81
+ };
82
+ }
83
+ export async function handleGmIngest(args) {
84
+ const parsed = gmIngestInputSchema.safeParse(args);
85
+ if (!parsed.success) {
86
+ return { content: [{ type: 'text', text: `Invalid input: ${parsed.error.message}` }], isError: true };
87
+ }
88
+ return buildGmIngestRequest(new TacitClient(), parsed.data).execute();
89
+ }
90
+ // ─── tacit_gm_approve ───────────────────────────────────────────────────────
91
+ export const gmApproveInputSchema = z.object({
92
+ catalog_id: z.string().uuid().describe('The catalog entry to approve placement for'),
93
+ approved_targets: z.array(z.object({
94
+ surface: z.enum(['kb', 'pyramid']),
95
+ collection_or_program: z.string().optional(),
96
+ dossier_id: z.string().uuid().optional(),
97
+ })).describe('Targets to approve for placement'),
98
+ rejected_targets: z.array(z.object({
99
+ surface: z.string(),
100
+ reason: z.string().optional(),
101
+ })).optional().default([]).describe('Targets to explicitly reject'),
102
+ });
103
+ export const GM_APPROVE_TOOL_DEF = {
104
+ name: 'tacit_gm_approve',
105
+ description: 'Approve placement targets for a catalog entry created by tacit_gm_ingest. ' +
106
+ 'Routes the content to approved surfaces (KB article, pyramid artifact) and records rejections. ' +
107
+ 'Route: POST /api/v1/gm/approve.',
108
+ inputSchema: {
109
+ type: 'object',
110
+ properties: {
111
+ catalog_id: { type: 'string', description: 'The catalog entry to approve placement for' },
112
+ approved_targets: {
113
+ type: 'array',
114
+ items: {
115
+ type: 'object',
116
+ properties: {
117
+ surface: { type: 'string', enum: ['kb', 'pyramid'], description: 'Target surface' },
118
+ collection_or_program: { type: 'string', description: 'KB collection or pyramid program name' },
119
+ dossier_id: { type: 'string', description: 'Dossier UUID for pyramid placement' },
120
+ },
121
+ required: ['surface'],
122
+ },
123
+ description: 'Targets to approve for placement',
124
+ },
125
+ rejected_targets: {
126
+ type: 'array',
127
+ items: {
128
+ type: 'object',
129
+ properties: {
130
+ surface: { type: 'string', description: 'Surface being rejected' },
131
+ reason: { type: 'string', description: 'Reason for rejection' },
132
+ },
133
+ required: ['surface'],
134
+ },
135
+ description: 'Targets to explicitly reject',
136
+ },
137
+ },
138
+ required: ['catalog_id', 'approved_targets'],
139
+ },
140
+ };
141
+ export function buildGmApproveRequest(client, input) {
142
+ return {
143
+ async execute() {
144
+ try {
145
+ const body = {
146
+ catalog_id: input.catalog_id,
147
+ approved_targets: input.approved_targets,
148
+ };
149
+ if (input.rejected_targets !== undefined && input.rejected_targets.length > 0) {
150
+ body['rejected_targets'] = input.rejected_targets;
151
+ }
152
+ const result = await client.post('/api/v1/gm/approve', body);
153
+ return { content: [{ type: 'text', text: JSON.stringify(result) }] };
154
+ }
155
+ catch (err) {
156
+ return apiErrorResult(err, 'tacit_gm_approve');
157
+ }
158
+ },
159
+ };
160
+ }
161
+ export async function handleGmApprove(args) {
162
+ const parsed = gmApproveInputSchema.safeParse(args);
163
+ if (!parsed.success) {
164
+ return { content: [{ type: 'text', text: `Invalid input: ${parsed.error.message}` }], isError: true };
165
+ }
166
+ return buildGmApproveRequest(new TacitClient(), parsed.data).execute();
167
+ }
168
+ // ─── Registration ───────────────────────────────────────────────────────────
169
+ export function registerGmTools(server, getClientFn) {
170
+ server.tool('tacit_gm_ingest', GM_INGEST_TOOL_DEF.description, {
171
+ content: z.string().min(1).describe('The content to ingest'),
172
+ title: z.string().min(1).describe('Title for the catalog entry'),
173
+ source_uri: z.string().optional().describe('Source URI (defaults to tacit://adhoc/<uuid>)'),
174
+ content_type: z.string().optional().describe('Content type (auto-detected if omitted)'),
175
+ classification_hints: z.object({
176
+ domain: z.string().optional(),
177
+ content_type: z.string().optional(),
178
+ }).optional().describe('Optional hints for the classifier'),
179
+ }, async (args) => {
180
+ const client = await getClientFn();
181
+ return buildGmIngestRequest(client, args).execute();
182
+ });
183
+ server.tool('tacit_gm_approve', GM_APPROVE_TOOL_DEF.description, {
184
+ catalog_id: z.string().uuid().describe('The catalog entry to approve placement for'),
185
+ approved_targets: z.array(z.object({
186
+ surface: z.enum(['kb', 'pyramid']),
187
+ collection_or_program: z.string().optional(),
188
+ dossier_id: z.string().uuid().optional(),
189
+ })).describe('Targets to approve for placement'),
190
+ rejected_targets: z.array(z.object({
191
+ surface: z.string(),
192
+ reason: z.string().optional(),
193
+ })).optional().default([]).describe('Targets to explicitly reject'),
194
+ }, async (args) => {
195
+ const client = await getClientFn();
196
+ return buildGmApproveRequest(client, args).execute();
197
+ });
198
+ }
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * Ingest tools:
3
- * tacit_ingest_file — POST /api/v1/portfolios/:id/ingest
4
- * tacit_ingest_url — POST /api/v1/portfolios/:id/ingest-url
3
+ * tacit_ingest_file — POST /api/v1/portfolios/:id/ingest
4
+ * tacit_ingest_url — POST /api/v1/portfolios/:id/ingest-url
5
+ * tacit_ingest_url_general — POST /api/v1/portfolios/:id/ingest-url-general (FEAT-175)
5
6
  *
6
7
  * Both require portfolio_id input.
7
8
  *
@@ -15,6 +16,7 @@
15
16
  * (no DNS resolution required for the guard to function).
16
17
  */
17
18
  import { z } from 'zod';
19
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
18
20
  import { TacitClient } from '../client.js';
19
21
  export interface ToolRequest {
20
22
  execute(): Promise<{
@@ -93,17 +95,68 @@ export declare function handleIngestFile(args: unknown): Promise<{
93
95
  }>;
94
96
  isError?: boolean;
95
97
  }>;
98
+ export declare const ingestUrlGeneralInputSchema: z.ZodObject<{
99
+ portfolio_id: z.ZodString;
100
+ url: z.ZodString;
101
+ program_id: z.ZodOptional<z.ZodString>;
102
+ title: z.ZodOptional<z.ZodString>;
103
+ }, "strip", z.ZodTypeAny, {
104
+ url: string;
105
+ portfolio_id: string;
106
+ title?: string | undefined;
107
+ program_id?: string | undefined;
108
+ }, {
109
+ url: string;
110
+ portfolio_id: string;
111
+ title?: string | undefined;
112
+ program_id?: string | undefined;
113
+ }>;
114
+ export type IngestUrlGeneralInput = z.infer<typeof ingestUrlGeneralInputSchema>;
115
+ export declare const INGEST_URL_GENERAL_TOOL_DEF: {
116
+ name: "tacit_ingest_url_general";
117
+ description: string;
118
+ inputSchema: {
119
+ type: "object";
120
+ properties: {
121
+ portfolio_id: {
122
+ type: string;
123
+ description: string;
124
+ };
125
+ url: {
126
+ type: string;
127
+ description: string;
128
+ };
129
+ program_id: {
130
+ type: string;
131
+ description: string;
132
+ };
133
+ title: {
134
+ type: string;
135
+ description: string;
136
+ };
137
+ };
138
+ required: string[];
139
+ };
140
+ };
141
+ export declare function buildIngestUrlGeneralRequest(client: TacitClient, input: IngestUrlGeneralInput): ToolRequest;
142
+ export declare function handleIngestUrlGeneral(args: unknown): Promise<{
143
+ content: Array<{
144
+ type: 'text';
145
+ text: string;
146
+ }>;
147
+ isError?: boolean;
148
+ }>;
96
149
  export declare const ingestUrlInputSchema: z.ZodObject<{
97
150
  portfolio_id: z.ZodString;
98
151
  url: z.ZodString;
99
152
  program_id: z.ZodString;
100
153
  }, "strip", z.ZodTypeAny, {
101
- portfolio_id: string;
102
154
  url: string;
155
+ portfolio_id: string;
103
156
  program_id: string;
104
157
  }, {
105
- portfolio_id: string;
106
158
  url: string;
159
+ portfolio_id: string;
107
160
  program_id: string;
108
161
  }>;
109
162
  export type IngestUrlInput = z.infer<typeof ingestUrlInputSchema>;
@@ -137,3 +190,4 @@ export declare function handleIngestUrl(args: unknown): Promise<{
137
190
  }>;
138
191
  isError?: boolean;
139
192
  }>;
193
+ export declare function registerIngestTools(server: McpServer, getClientFn: () => Promise<TacitClient>): void;