@etsquare/mcp-server-sec 0.2.1 → 0.5.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.
- package/dist/etsquare-client.d.ts +69 -4
- package/dist/etsquare-client.js +94 -12
- package/dist/index.js +1187 -66
- package/dist/types.d.ts +46 -0
- package/dist/types.js +28 -0
- package/package.json +8 -3
package/dist/types.d.ts
CHANGED
|
@@ -7,10 +7,14 @@ export declare const searchSchema: z.ZodObject<{
|
|
|
7
7
|
tickers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
8
8
|
sic_codes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
9
9
|
doc_types: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
10
|
+
response_format: z.ZodDefault<z.ZodEnum<["text", "structured"]>>;
|
|
11
|
+
include_context: z.ZodDefault<z.ZodBoolean>;
|
|
10
12
|
}, "strip", z.ZodTypeAny, {
|
|
11
13
|
query: string;
|
|
12
14
|
mode_lock: "NARRATIVE" | "HYBRID";
|
|
13
15
|
scope_lock: "COMPANY" | "INDUSTRY" | "MACRO";
|
|
16
|
+
response_format: "text" | "structured";
|
|
17
|
+
include_context: boolean;
|
|
14
18
|
top_k?: number | undefined;
|
|
15
19
|
tickers?: string[] | undefined;
|
|
16
20
|
sic_codes?: string[] | undefined;
|
|
@@ -23,6 +27,8 @@ export declare const searchSchema: z.ZodObject<{
|
|
|
23
27
|
tickers?: string[] | undefined;
|
|
24
28
|
sic_codes?: string[] | undefined;
|
|
25
29
|
doc_types?: string[] | undefined;
|
|
30
|
+
response_format?: "text" | "structured" | undefined;
|
|
31
|
+
include_context?: boolean | undefined;
|
|
26
32
|
}>;
|
|
27
33
|
export declare const lookupCompanySchema: z.ZodObject<{
|
|
28
34
|
query: z.ZodString;
|
|
@@ -38,12 +44,18 @@ export declare const executeMetricsSchema: z.ZodObject<{
|
|
|
38
44
|
template_id: z.ZodString;
|
|
39
45
|
bind_params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
40
46
|
row_limit: z.ZodOptional<z.ZodNumber>;
|
|
47
|
+
tickers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
48
|
+
response_format: z.ZodDefault<z.ZodEnum<["text", "structured"]>>;
|
|
41
49
|
}, "strip", z.ZodTypeAny, {
|
|
50
|
+
response_format: "text" | "structured";
|
|
42
51
|
template_id: string;
|
|
52
|
+
tickers?: string[] | undefined;
|
|
43
53
|
bind_params?: Record<string, unknown> | undefined;
|
|
44
54
|
row_limit?: number | undefined;
|
|
45
55
|
}, {
|
|
46
56
|
template_id: string;
|
|
57
|
+
tickers?: string[] | undefined;
|
|
58
|
+
response_format?: "text" | "structured" | undefined;
|
|
47
59
|
bind_params?: Record<string, unknown> | undefined;
|
|
48
60
|
row_limit?: number | undefined;
|
|
49
61
|
}>;
|
|
@@ -52,13 +64,16 @@ export declare const discoverMetricsSchema: z.ZodObject<{
|
|
|
52
64
|
scenario: z.ZodOptional<z.ZodEnum<["snapshot", "trends", "peer_benchmark"]>>;
|
|
53
65
|
metric_family: z.ZodOptional<z.ZodString>;
|
|
54
66
|
max_results: z.ZodOptional<z.ZodNumber>;
|
|
67
|
+
response_format: z.ZodDefault<z.ZodEnum<["text", "structured"]>>;
|
|
55
68
|
}, "strip", z.ZodTypeAny, {
|
|
69
|
+
response_format: "text" | "structured";
|
|
56
70
|
question: string;
|
|
57
71
|
scenario?: "snapshot" | "trends" | "peer_benchmark" | undefined;
|
|
58
72
|
metric_family?: string | undefined;
|
|
59
73
|
max_results?: number | undefined;
|
|
60
74
|
}, {
|
|
61
75
|
question: string;
|
|
76
|
+
response_format?: "text" | "structured" | undefined;
|
|
62
77
|
scenario?: "snapshot" | "trends" | "peer_benchmark" | undefined;
|
|
63
78
|
metric_family?: string | undefined;
|
|
64
79
|
max_results?: number | undefined;
|
|
@@ -86,9 +101,40 @@ export declare const getChunkContextSchema: z.ZodObject<{
|
|
|
86
101
|
neighbor_span?: number | undefined;
|
|
87
102
|
window?: number | undefined;
|
|
88
103
|
}>;
|
|
104
|
+
export declare const compareSchema: z.ZodObject<{
|
|
105
|
+
tickers: z.ZodArray<z.ZodString, "many">;
|
|
106
|
+
query: z.ZodString;
|
|
107
|
+
mode_lock: z.ZodDefault<z.ZodEnum<["NARRATIVE", "HYBRID"]>>;
|
|
108
|
+
top_k_per_ticker: z.ZodDefault<z.ZodNumber>;
|
|
109
|
+
doc_types: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
110
|
+
}, "strip", z.ZodTypeAny, {
|
|
111
|
+
query: string;
|
|
112
|
+
mode_lock: "NARRATIVE" | "HYBRID";
|
|
113
|
+
tickers: string[];
|
|
114
|
+
top_k_per_ticker: number;
|
|
115
|
+
doc_types?: string[] | undefined;
|
|
116
|
+
}, {
|
|
117
|
+
query: string;
|
|
118
|
+
tickers: string[];
|
|
119
|
+
mode_lock?: "NARRATIVE" | "HYBRID" | undefined;
|
|
120
|
+
doc_types?: string[] | undefined;
|
|
121
|
+
top_k_per_ticker?: number | undefined;
|
|
122
|
+
}>;
|
|
123
|
+
export declare const weeklyBriefSchema: z.ZodObject<{
|
|
124
|
+
sections: z.ZodOptional<z.ZodArray<z.ZodEnum<["notable", "edge_signals", "heatmap", "methodology"]>, "many">>;
|
|
125
|
+
response_format: z.ZodDefault<z.ZodEnum<["text", "structured"]>>;
|
|
126
|
+
}, "strip", z.ZodTypeAny, {
|
|
127
|
+
response_format: "text" | "structured";
|
|
128
|
+
sections?: ("notable" | "edge_signals" | "heatmap" | "methodology")[] | undefined;
|
|
129
|
+
}, {
|
|
130
|
+
response_format?: "text" | "structured" | undefined;
|
|
131
|
+
sections?: ("notable" | "edge_signals" | "heatmap" | "methodology")[] | undefined;
|
|
132
|
+
}>;
|
|
89
133
|
export type SearchInput = z.infer<typeof searchSchema>;
|
|
90
134
|
export type LookupCompanyInput = z.infer<typeof lookupCompanySchema>;
|
|
91
135
|
export type ExecuteMetricsInput = z.infer<typeof executeMetricsSchema>;
|
|
92
136
|
export type DiscoverMetricsInput = z.infer<typeof discoverMetricsSchema>;
|
|
93
137
|
export type GetChunkInput = z.infer<typeof getChunkSchema>;
|
|
94
138
|
export type GetChunkContextInput = z.infer<typeof getChunkContextSchema>;
|
|
139
|
+
export type CompareInput = z.infer<typeof compareSchema>;
|
|
140
|
+
export type WeeklyBriefInput = z.infer<typeof weeklyBriefSchema>;
|
package/dist/types.js
CHANGED
|
@@ -7,6 +7,10 @@ export const searchSchema = z.object({
|
|
|
7
7
|
tickers: z.array(z.string()).optional(),
|
|
8
8
|
sic_codes: z.array(z.string()).optional(),
|
|
9
9
|
doc_types: z.array(z.string()).optional(),
|
|
10
|
+
response_format: z.enum(['text', 'structured']).default('text')
|
|
11
|
+
.describe('Default "text" returns numbered citations. "structured" returns typed JSON with search_context, typed results, and layout hints.'),
|
|
12
|
+
include_context: z.boolean().default(false)
|
|
13
|
+
.describe('Auto-expand top 2 truncated results with surrounding context (saves separate get_chunk_context calls)'),
|
|
10
14
|
});
|
|
11
15
|
export const lookupCompanySchema = z.object({
|
|
12
16
|
query: z.string().min(2, 'query must be at least 2 characters'),
|
|
@@ -16,12 +20,18 @@ export const executeMetricsSchema = z.object({
|
|
|
16
20
|
template_id: z.string().min(10, 'template_id is required'),
|
|
17
21
|
bind_params: z.record(z.unknown()).optional(),
|
|
18
22
|
row_limit: z.number().min(1).max(500).optional(),
|
|
23
|
+
tickers: z.array(z.string()).max(5).optional()
|
|
24
|
+
.describe('Execute same template for multiple tickers and merge results. Overrides p_ticker in bind_params.'),
|
|
25
|
+
response_format: z.enum(['text', 'structured']).default('text')
|
|
26
|
+
.describe('Default "text" returns markdown table. "structured" returns typed JSON with columns, rows, and visualization_hint.'),
|
|
19
27
|
});
|
|
20
28
|
export const discoverMetricsSchema = z.object({
|
|
21
29
|
question: z.string().min(3, 'question must be at least 3 characters'),
|
|
22
30
|
scenario: z.enum(['snapshot', 'trends', 'peer_benchmark']).optional(),
|
|
23
31
|
metric_family: z.string().optional(),
|
|
24
32
|
max_results: z.number().min(1).max(10).optional(),
|
|
33
|
+
response_format: z.enum(['text', 'structured']).default('text')
|
|
34
|
+
.describe('Default "text" returns formatted list. "structured" returns JSON with similarity scores and viz hints.'),
|
|
25
35
|
});
|
|
26
36
|
export const getChunkSchema = z.object({
|
|
27
37
|
chunk_id: z.string().length(32, 'chunk_id must be a 32-character hex string'),
|
|
@@ -32,3 +42,21 @@ export const getChunkContextSchema = z.object({
|
|
|
32
42
|
neighbor_span: z.number().min(0).max(5).optional(),
|
|
33
43
|
window: z.number().min(200).max(4000).optional(),
|
|
34
44
|
});
|
|
45
|
+
export const compareSchema = z.object({
|
|
46
|
+
tickers: z.array(z.string()).min(2).max(5)
|
|
47
|
+
.describe('Company tickers to compare (2-5). Resolve names first with etsquare_lookup_company.'),
|
|
48
|
+
query: z.string().min(3)
|
|
49
|
+
.describe('Comparison question (e.g., "revenue growth and risk factors", "tariff risk exposure")'),
|
|
50
|
+
mode_lock: z.enum(['NARRATIVE', 'HYBRID']).default('NARRATIVE')
|
|
51
|
+
.describe('HYBRID recommended for comparisons (gets both text and metrics)'),
|
|
52
|
+
top_k_per_ticker: z.number().int().min(1).max(10).default(3)
|
|
53
|
+
.describe('Narrative results per company'),
|
|
54
|
+
doc_types: z.array(z.string()).optional()
|
|
55
|
+
.describe('Limit by form type (e.g., ["10-k", "8-k"])'),
|
|
56
|
+
});
|
|
57
|
+
export const weeklyBriefSchema = z.object({
|
|
58
|
+
sections: z.array(z.enum(['notable', 'edge_signals', 'heatmap', 'methodology'])).optional()
|
|
59
|
+
.describe('Filter to specific sections. Returns all if omitted.'),
|
|
60
|
+
response_format: z.enum(['text', 'structured']).default('structured')
|
|
61
|
+
.describe('"structured" returns full JSON. "text" returns a readable summary.'),
|
|
62
|
+
});
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsquare/mcp-server-sec",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "MCP server for Claude Desktop: search
|
|
5
|
+
"description": "MCP server for Claude Desktop: search SEC filing sections, financial statements, insider trades, institutional ownership, earnings actuals, XBRL metrics, and company lookup.",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"bin": {
|
|
@@ -20,7 +20,12 @@
|
|
|
20
20
|
"xbrl",
|
|
21
21
|
"financial-analysis",
|
|
22
22
|
"search",
|
|
23
|
-
"hybrid-search"
|
|
23
|
+
"hybrid-search",
|
|
24
|
+
"insider-trading",
|
|
25
|
+
"institutional-ownership",
|
|
26
|
+
"13f",
|
|
27
|
+
"earnings",
|
|
28
|
+
"financial-statements"
|
|
24
29
|
],
|
|
25
30
|
"author": "ETSquare",
|
|
26
31
|
"license": "MIT",
|