@withpica/mcp-server 2.4.1 → 2.4.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.
- package/dist/index.d.ts +1 -1
- package/dist/pica-sdk.d.ts +1038 -984
- package/dist/prompts/index.d.ts +64 -64
- package/dist/resources/index.d.ts +52 -52
- package/dist/server.d.ts +32 -32
- package/dist/tools/index.d.ts +36 -36
- package/dist/tools/people.d.ts +46 -46
- package/dist/tools/people.d.ts.map +1 -1
- package/dist/tools/people.js +5 -1
- package/dist/tools/people.js.map +1 -1
- package/dist/tools/search.d.ts +20 -20
- package/dist/tools/works.d.ts +46 -46
- package/dist/utils/errors.d.ts +9 -9
- package/dist/utils/formatting.d.ts +35 -16
- package/package.json +1 -1
package/dist/tools/works.d.ts
CHANGED
|
@@ -4,50 +4,50 @@
|
|
|
4
4
|
import { PicaClient } from "../pica-sdk.js";
|
|
5
5
|
import { ToolDefinition, ToolExecutor } from "./index.js";
|
|
6
6
|
export declare class WorksTools {
|
|
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
|
-
|
|
7
|
+
private pica;
|
|
8
|
+
constructor(pica: PicaClient);
|
|
9
|
+
/**
|
|
10
|
+
* Get all works tools
|
|
11
|
+
*/
|
|
12
|
+
getTools(): Array<{
|
|
13
|
+
definition: ToolDefinition;
|
|
14
|
+
executor: ToolExecutor;
|
|
15
|
+
}>;
|
|
16
|
+
/**
|
|
17
|
+
* List works (server-side search and pagination)
|
|
18
|
+
*/
|
|
19
|
+
private listWorks;
|
|
20
|
+
/**
|
|
21
|
+
* Get work by ID
|
|
22
|
+
*/
|
|
23
|
+
private getWork;
|
|
24
|
+
/**
|
|
25
|
+
* Create work
|
|
26
|
+
*/
|
|
27
|
+
private createWork;
|
|
28
|
+
/**
|
|
29
|
+
* Update work
|
|
30
|
+
*/
|
|
31
|
+
private updateWork;
|
|
32
|
+
/**
|
|
33
|
+
* Delete work
|
|
34
|
+
*/
|
|
35
|
+
private deleteWork;
|
|
36
|
+
/**
|
|
37
|
+
* Verify work
|
|
38
|
+
*/
|
|
39
|
+
private verifyWork;
|
|
40
|
+
/**
|
|
41
|
+
* Search works (server-side)
|
|
42
|
+
*/
|
|
43
|
+
private searchWorks;
|
|
44
|
+
/**
|
|
45
|
+
* Bulk delete works
|
|
46
|
+
*/
|
|
47
|
+
private bulkDeleteWorks;
|
|
48
|
+
/**
|
|
49
|
+
* Get full work context bundle
|
|
50
|
+
*/
|
|
51
|
+
private getWorkFull;
|
|
52
52
|
}
|
|
53
|
-
//# sourceMappingURL=works.d.ts.map
|
|
53
|
+
//# sourceMappingURL=works.d.ts.map
|
package/dist/utils/errors.d.ts
CHANGED
|
@@ -2,28 +2,28 @@
|
|
|
2
2
|
* Error handling utilities for MCP server
|
|
3
3
|
*/
|
|
4
4
|
export declare class McpServerError extends Error {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
code: string;
|
|
6
|
+
details?: any | undefined;
|
|
7
|
+
constructor(message: string, code: string, details?: any | undefined);
|
|
8
8
|
}
|
|
9
9
|
export declare class AuthenticationError extends McpServerError {
|
|
10
|
-
|
|
10
|
+
constructor(message?: string, details?: any);
|
|
11
11
|
}
|
|
12
12
|
export declare class ToolExecutionError extends McpServerError {
|
|
13
|
-
|
|
13
|
+
constructor(message: string, details?: any);
|
|
14
14
|
}
|
|
15
15
|
export declare class ResourceError extends McpServerError {
|
|
16
|
-
|
|
16
|
+
constructor(message: string, details?: any);
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* Format error for MCP response
|
|
20
20
|
*/
|
|
21
21
|
export declare function formatError(error: any): {
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
type: string;
|
|
23
|
+
text: string;
|
|
24
24
|
};
|
|
25
25
|
/**
|
|
26
26
|
* Log error with structured context (JSON to stderr for machine parsing)
|
|
27
27
|
*/
|
|
28
28
|
export declare function logError(context: string, error: any): void;
|
|
29
|
-
//# sourceMappingURL=errors.d.ts.map
|
|
29
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
* AND a structuredContent object for machine parsing (ADR-104 §1.2).
|
|
6
6
|
*/
|
|
7
7
|
export interface FormattedResult {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
content: Array<{
|
|
9
|
+
type: string;
|
|
10
|
+
text: string;
|
|
11
|
+
}>;
|
|
12
|
+
structuredContent?: Record<string, unknown>;
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* Format data as JSON text for MCP response
|
|
@@ -20,10 +20,10 @@ export declare function formatAsText(data: any): FormattedResult;
|
|
|
20
20
|
* The LLM decides whether and how to surface these to the user.
|
|
21
21
|
*/
|
|
22
22
|
export interface CompletionHint {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
gap: string;
|
|
24
|
+
suggestion: string;
|
|
25
|
+
count?: number;
|
|
26
|
+
severity?: "critical" | "important" | "nice_to_have";
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
29
|
* Format success message, with optional completion hints for the guided loop.
|
|
@@ -32,16 +32,26 @@ export interface CompletionHint {
|
|
|
32
32
|
* can naturally suggest the next step without PICA dictating the conversation.
|
|
33
33
|
* If no hints are provided, the response is identical to the old format.
|
|
34
34
|
*/
|
|
35
|
-
export declare function formatSuccess(
|
|
35
|
+
export declare function formatSuccess(
|
|
36
|
+
message: string,
|
|
37
|
+
data?: any,
|
|
38
|
+
completionHints?: CompletionHint[],
|
|
39
|
+
): FormattedResult;
|
|
36
40
|
/**
|
|
37
41
|
* Map raw gap objects from the completeness API into CompletionHints.
|
|
38
42
|
* The API response shape varies — this handles the known field names.
|
|
39
43
|
*/
|
|
40
|
-
export declare function mapGapsToHints(
|
|
44
|
+
export declare function mapGapsToHints(
|
|
45
|
+
gaps: any[],
|
|
46
|
+
limit?: number,
|
|
47
|
+
): CompletionHint[];
|
|
41
48
|
/**
|
|
42
49
|
* Format array of items with count
|
|
43
50
|
*/
|
|
44
|
-
export declare function formatList<T>(
|
|
51
|
+
export declare function formatList<T>(
|
|
52
|
+
items: T[],
|
|
53
|
+
metadata?: Record<string, any>,
|
|
54
|
+
): FormattedResult;
|
|
45
55
|
/**
|
|
46
56
|
* Truncate text to max length
|
|
47
57
|
*/
|
|
@@ -49,15 +59,24 @@ export declare function truncate(text: string, maxLength?: number): string;
|
|
|
49
59
|
/**
|
|
50
60
|
* Format validation error
|
|
51
61
|
*/
|
|
52
|
-
export declare function formatValidationError(
|
|
62
|
+
export declare function formatValidationError(
|
|
63
|
+
fields: Record<string, string>,
|
|
64
|
+
): FormattedResult;
|
|
53
65
|
/**
|
|
54
66
|
* Format structured response with dual content blocks:
|
|
55
67
|
* - Human-readable text (includes full JSON so all MCP clients can read it)
|
|
56
68
|
* - Machine-parseable structuredContent object
|
|
57
69
|
*/
|
|
58
|
-
export declare function formatStructured(
|
|
70
|
+
export declare function formatStructured(
|
|
71
|
+
data: any,
|
|
72
|
+
summary?: string,
|
|
73
|
+
): FormattedResult;
|
|
59
74
|
/**
|
|
60
75
|
* Format a list with both human summary and structured JSON
|
|
61
76
|
*/
|
|
62
|
-
export declare function formatStructuredList<T>(
|
|
63
|
-
|
|
77
|
+
export declare function formatStructuredList<T>(
|
|
78
|
+
items: T[],
|
|
79
|
+
entityName: string,
|
|
80
|
+
metadata?: Record<string, any>,
|
|
81
|
+
): FormattedResult;
|
|
82
|
+
//# sourceMappingURL=formatting.d.ts.map
|
package/package.json
CHANGED