@pgnio/helios-mcp 0.2.1 → 0.2.3

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/cli.js CHANGED
@@ -220,7 +220,9 @@ var marketSnapshotResolvedScopeSchema = import_zod.z.enum(["selected", "all", "e
220
220
  var marketSnapshotValueSchema = import_zod.z.union([import_zod.z.string(), import_zod.z.number(), import_zod.z.boolean(), import_zod.z.null()]);
221
221
  var marketSnapshotInputSchema = import_zod.z.object({
222
222
  scope: marketSnapshotScopeSchema.optional(),
223
- symbols: import_zod.z.array(import_zod.z.string().min(1)).min(1).optional()
223
+ symbols: import_zod.z.array(import_zod.z.string().min(1)).min(1).optional(),
224
+ fields: import_zod.z.array(import_zod.z.string().min(1)).min(1).optional().describe('Table columns to return, e.g. ["lp","r1h","r24h","hmi","reg","hs"]; sym and base always come back. Omit for all columns.'),
225
+ sort: import_zod.z.enum(["rank"]).optional().describe('"rank" orders rows by market cap rank, unranked last.')
224
226
  });
225
227
  var marketSnapshotChunkInputSchema = marketSnapshotInputSchema.extend({
226
228
  offset: import_zod.z.number().int().nonnegative().optional(),
@@ -2567,7 +2569,7 @@ function createHeliosMarketToolDefinitions(service) {
2567
2569
  {
2568
2570
  name: "helios_market_get_snapshot",
2569
2571
  title: "Get Helios Market Snapshot",
2570
- description: "Returns a compact market snapshot for the selected, all, or explicitly requested symbols.",
2572
+ description: "Returns a compact market snapshot for the selected, all, or explicitly requested symbols. The full table is large; pass fields to get only the columns you need.",
2571
2573
  inputSchema: marketSnapshotInputSchema,
2572
2574
  async execute(input) {
2573
2575
  const result = marketSnapshotToolOutputSchema.parse(await service.getSnapshot(input));
@@ -2835,7 +2837,7 @@ async function createHeliosAgentMcpServer(options) {
2835
2837
  const { McpServer } = await import("@modelcontextprotocol/sdk/server/mcp.js");
2836
2838
  const server = new McpServer({
2837
2839
  name: "helios",
2838
- version: "0.2.1"
2840
+ version: "0.2.3"
2839
2841
  });
2840
2842
  const sessionStore = options.sessionStore ?? new FileAgentSessionStore(options.sessionPath ?? getDefaultHeliosAgentMcpSessionPath());
2841
2843
  const client = new HeliosAgentAuthClient({
@@ -2928,6 +2930,11 @@ function toolAnnotations(name) {
2928
2930
  if (CHANGES_SESSION.test(name)) return { readOnlyHint: false, destructiveHint: false, openWorldHint: false };
2929
2931
  return { readOnlyHint: true, destructiveHint: false, openWorldHint: true };
2930
2932
  }
2933
+ var TEXT_IS_RESULT = /* @__PURE__ */ new Set(["helios_docs_get_document"]);
2934
+ function withDataText(name, content, structuredContent) {
2935
+ if (TEXT_IS_RESULT.has(name)) return content;
2936
+ return [...content, { type: "text", text: JSON.stringify(structuredContent) }];
2937
+ }
2931
2938
  function registerTool(server, tool) {
2932
2939
  server.registerTool(
2933
2940
  tool.name,
@@ -2940,7 +2947,7 @@ function registerTool(server, tool) {
2940
2947
  async (input) => {
2941
2948
  const result = await tool.execute(tool.inputSchema.parse(input));
2942
2949
  return {
2943
- ...result,
2950
+ content: withDataText(tool.name, result.content, result.structuredContent),
2944
2951
  structuredContent: result.structuredContent
2945
2952
  };
2946
2953
  }
package/dist/cli.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  createHeliosAgentMcpServer
4
- } from "./chunk-NCF7ASJB.mjs";
4
+ } from "./chunk-UYCUR7QV.mjs";
5
5
 
6
6
  // src/cli.ts
7
7
  async function main() {
package/dist/index.d.mts CHANGED
@@ -206,6 +206,10 @@ declare const marketSnapshotInputSchema: z.ZodObject<{
206
206
  all: "all";
207
207
  }>>;
208
208
  symbols: z.ZodOptional<z.ZodArray<z.ZodString>>;
209
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
210
+ sort: z.ZodOptional<z.ZodEnum<{
211
+ rank: "rank";
212
+ }>>;
209
213
  }, z.core.$strip>;
210
214
  declare const marketSnapshotChunkInputSchema: z.ZodObject<{
211
215
  scope: z.ZodOptional<z.ZodEnum<{
@@ -213,6 +217,10 @@ declare const marketSnapshotChunkInputSchema: z.ZodObject<{
213
217
  all: "all";
214
218
  }>>;
215
219
  symbols: z.ZodOptional<z.ZodArray<z.ZodString>>;
220
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
221
+ sort: z.ZodOptional<z.ZodEnum<{
222
+ rank: "rank";
223
+ }>>;
216
224
  offset: z.ZodOptional<z.ZodNumber>;
217
225
  limit: z.ZodOptional<z.ZodNumber>;
218
226
  }, z.core.$strip>;
@@ -1042,6 +1050,18 @@ declare function toolAnnotations(name: string): {
1042
1050
  destructiveHint: boolean;
1043
1051
  openWorldHint: boolean;
1044
1052
  };
1053
+ /**
1054
+ * The tool's text plus its data as JSON. Many AI apps (Qwen Code, Cursor, older clients) only hand the model the text
1055
+ * content and drop structuredContent, so without this the agent sees the one-line summary and none of the data. The
1056
+ * MCP spec asks servers to send the JSON as text alongside structured results for exactly this reason.
1057
+ */
1058
+ declare function withDataText(name: string, content: Array<{
1059
+ type: 'text';
1060
+ text: string;
1061
+ }>, structuredContent: object): Array<{
1062
+ type: 'text';
1063
+ text: string;
1064
+ }>;
1045
1065
 
1046
1066
  interface HeliosMcpToolResult<TStructuredContent extends object> {
1047
1067
  content: Array<{
@@ -1445,10 +1465,16 @@ declare function createHeliosMarketToolDefinitions(service: HeliosAgentMcpMarket
1445
1465
  all: "all";
1446
1466
  }>>;
1447
1467
  symbols: z.ZodOptional<z.ZodArray<z.ZodString>>;
1468
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
1469
+ sort: z.ZodOptional<z.ZodEnum<{
1470
+ rank: "rank";
1471
+ }>>;
1448
1472
  }, z.core.$strip>;
1449
1473
  execute(input: {
1450
1474
  scope?: "selected" | "all" | undefined;
1451
1475
  symbols?: string[] | undefined;
1476
+ fields?: string[] | undefined;
1477
+ sort?: "rank" | undefined;
1452
1478
  }): Promise<{
1453
1479
  content: {
1454
1480
  type: "text";
@@ -1485,12 +1511,18 @@ declare function createHeliosMarketToolDefinitions(service: HeliosAgentMcpMarket
1485
1511
  all: "all";
1486
1512
  }>>;
1487
1513
  symbols: z.ZodOptional<z.ZodArray<z.ZodString>>;
1514
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
1515
+ sort: z.ZodOptional<z.ZodEnum<{
1516
+ rank: "rank";
1517
+ }>>;
1488
1518
  offset: z.ZodOptional<z.ZodNumber>;
1489
1519
  limit: z.ZodOptional<z.ZodNumber>;
1490
1520
  }, z.core.$strip>;
1491
1521
  execute(input: {
1492
1522
  scope?: "selected" | "all" | undefined;
1493
1523
  symbols?: string[] | undefined;
1524
+ fields?: string[] | undefined;
1525
+ sort?: "rank" | undefined;
1494
1526
  offset?: number | undefined;
1495
1527
  limit?: number | undefined;
1496
1528
  }): Promise<{
@@ -2135,4 +2167,4 @@ declare function createHeliosTradingToolDefinitions(service: HeliosAgentMcpTradi
2135
2167
  }>;
2136
2168
  }];
2137
2169
 
2138
- export { type ActiveProviderView, type AgentMcpSessionStore, type CancelOrderToolResult, type ClosePositionToolResult, type CreateHeliosAgentMcpServerOptions, type DeleteTpSlToolResult, type EnsureLoginOptions, type EnsureLoginResult, FileAgentSessionStore, type GetHeliosAgentMcpDocumentInput, HOSTED_RECONNECT_MESSAGE, HeliosAgentMcpAccountService, type HeliosAgentMcpAccountServiceOptions, HeliosAgentMcpAuthService, type HeliosAgentMcpAuthServiceOptions, type HeliosAgentMcpDocsIndex, type HeliosAgentMcpDocsIndexEntry, HeliosAgentMcpDocsService, type HeliosAgentMcpDocsServiceOptions, type HeliosAgentMcpDocument, HeliosAgentMcpLedgerService, type HeliosAgentMcpLedgerServiceOptions, HeliosAgentMcpMarketService, type HeliosAgentMcpMarketServiceOptions, HeliosAgentMcpProviderService, type HeliosAgentMcpProviderServiceOptions, HeliosAgentMcpTradingService, type HeliosAgentMcpTradingServiceOptions, type HeliosMcpToolDefinition, type HeliosMcpToolResult, type LedgerFillsResult, type LedgerSummaryResult, type MarketSnapshotChunkResult, type MarketSnapshotResult, type MarketSymbolDetailResult, MemoryAgentMcpSessionStore, type OpenOrdersToolResult, type OpenPositionsResult, type PendingAgentLogin, type PendingLoginResult, type PollLoginResult, type PortfolioResult, type SetTpSlToolResult, type StartLoginResult, type TradeIntentAction, type TradeIntentActionInput, type TradeIntentActionResult, type WalletStateResult, createHeliosAccountToolDefinitions, createHeliosAgentMcpServer, createHeliosAuthToolDefinitions, createHeliosDocsToolDefinitions, createHeliosLedgerToolDefinitions, createHeliosMarketToolDefinitions, createHeliosProviderToolDefinitions, createHeliosTradingToolDefinitions, formatHeliosLoginPrompt, getDefaultHeliosAgentMcpDocsRoot, getDefaultHeliosAgentMcpSessionPath, pendingAgentLoginSchema, retryAfterUnauthorizedRefresh, toolAnnotations };
2170
+ export { type ActiveProviderView, type AgentMcpSessionStore, type CancelOrderToolResult, type ClosePositionToolResult, type CreateHeliosAgentMcpServerOptions, type DeleteTpSlToolResult, type EnsureLoginOptions, type EnsureLoginResult, FileAgentSessionStore, type GetHeliosAgentMcpDocumentInput, HOSTED_RECONNECT_MESSAGE, HeliosAgentMcpAccountService, type HeliosAgentMcpAccountServiceOptions, HeliosAgentMcpAuthService, type HeliosAgentMcpAuthServiceOptions, type HeliosAgentMcpDocsIndex, type HeliosAgentMcpDocsIndexEntry, HeliosAgentMcpDocsService, type HeliosAgentMcpDocsServiceOptions, type HeliosAgentMcpDocument, HeliosAgentMcpLedgerService, type HeliosAgentMcpLedgerServiceOptions, HeliosAgentMcpMarketService, type HeliosAgentMcpMarketServiceOptions, HeliosAgentMcpProviderService, type HeliosAgentMcpProviderServiceOptions, HeliosAgentMcpTradingService, type HeliosAgentMcpTradingServiceOptions, type HeliosMcpToolDefinition, type HeliosMcpToolResult, type LedgerFillsResult, type LedgerSummaryResult, type MarketSnapshotChunkResult, type MarketSnapshotResult, type MarketSymbolDetailResult, MemoryAgentMcpSessionStore, type OpenOrdersToolResult, type OpenPositionsResult, type PendingAgentLogin, type PendingLoginResult, type PollLoginResult, type PortfolioResult, type SetTpSlToolResult, type StartLoginResult, type TradeIntentAction, type TradeIntentActionInput, type TradeIntentActionResult, type WalletStateResult, createHeliosAccountToolDefinitions, createHeliosAgentMcpServer, createHeliosAuthToolDefinitions, createHeliosDocsToolDefinitions, createHeliosLedgerToolDefinitions, createHeliosMarketToolDefinitions, createHeliosProviderToolDefinitions, createHeliosTradingToolDefinitions, formatHeliosLoginPrompt, getDefaultHeliosAgentMcpDocsRoot, getDefaultHeliosAgentMcpSessionPath, pendingAgentLoginSchema, retryAfterUnauthorizedRefresh, toolAnnotations, withDataText };
package/dist/index.d.ts CHANGED
@@ -206,6 +206,10 @@ declare const marketSnapshotInputSchema: z.ZodObject<{
206
206
  all: "all";
207
207
  }>>;
208
208
  symbols: z.ZodOptional<z.ZodArray<z.ZodString>>;
209
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
210
+ sort: z.ZodOptional<z.ZodEnum<{
211
+ rank: "rank";
212
+ }>>;
209
213
  }, z.core.$strip>;
210
214
  declare const marketSnapshotChunkInputSchema: z.ZodObject<{
211
215
  scope: z.ZodOptional<z.ZodEnum<{
@@ -213,6 +217,10 @@ declare const marketSnapshotChunkInputSchema: z.ZodObject<{
213
217
  all: "all";
214
218
  }>>;
215
219
  symbols: z.ZodOptional<z.ZodArray<z.ZodString>>;
220
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
221
+ sort: z.ZodOptional<z.ZodEnum<{
222
+ rank: "rank";
223
+ }>>;
216
224
  offset: z.ZodOptional<z.ZodNumber>;
217
225
  limit: z.ZodOptional<z.ZodNumber>;
218
226
  }, z.core.$strip>;
@@ -1042,6 +1050,18 @@ declare function toolAnnotations(name: string): {
1042
1050
  destructiveHint: boolean;
1043
1051
  openWorldHint: boolean;
1044
1052
  };
1053
+ /**
1054
+ * The tool's text plus its data as JSON. Many AI apps (Qwen Code, Cursor, older clients) only hand the model the text
1055
+ * content and drop structuredContent, so without this the agent sees the one-line summary and none of the data. The
1056
+ * MCP spec asks servers to send the JSON as text alongside structured results for exactly this reason.
1057
+ */
1058
+ declare function withDataText(name: string, content: Array<{
1059
+ type: 'text';
1060
+ text: string;
1061
+ }>, structuredContent: object): Array<{
1062
+ type: 'text';
1063
+ text: string;
1064
+ }>;
1045
1065
 
1046
1066
  interface HeliosMcpToolResult<TStructuredContent extends object> {
1047
1067
  content: Array<{
@@ -1445,10 +1465,16 @@ declare function createHeliosMarketToolDefinitions(service: HeliosAgentMcpMarket
1445
1465
  all: "all";
1446
1466
  }>>;
1447
1467
  symbols: z.ZodOptional<z.ZodArray<z.ZodString>>;
1468
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
1469
+ sort: z.ZodOptional<z.ZodEnum<{
1470
+ rank: "rank";
1471
+ }>>;
1448
1472
  }, z.core.$strip>;
1449
1473
  execute(input: {
1450
1474
  scope?: "selected" | "all" | undefined;
1451
1475
  symbols?: string[] | undefined;
1476
+ fields?: string[] | undefined;
1477
+ sort?: "rank" | undefined;
1452
1478
  }): Promise<{
1453
1479
  content: {
1454
1480
  type: "text";
@@ -1485,12 +1511,18 @@ declare function createHeliosMarketToolDefinitions(service: HeliosAgentMcpMarket
1485
1511
  all: "all";
1486
1512
  }>>;
1487
1513
  symbols: z.ZodOptional<z.ZodArray<z.ZodString>>;
1514
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
1515
+ sort: z.ZodOptional<z.ZodEnum<{
1516
+ rank: "rank";
1517
+ }>>;
1488
1518
  offset: z.ZodOptional<z.ZodNumber>;
1489
1519
  limit: z.ZodOptional<z.ZodNumber>;
1490
1520
  }, z.core.$strip>;
1491
1521
  execute(input: {
1492
1522
  scope?: "selected" | "all" | undefined;
1493
1523
  symbols?: string[] | undefined;
1524
+ fields?: string[] | undefined;
1525
+ sort?: "rank" | undefined;
1494
1526
  offset?: number | undefined;
1495
1527
  limit?: number | undefined;
1496
1528
  }): Promise<{
@@ -2135,4 +2167,4 @@ declare function createHeliosTradingToolDefinitions(service: HeliosAgentMcpTradi
2135
2167
  }>;
2136
2168
  }];
2137
2169
 
2138
- export { type ActiveProviderView, type AgentMcpSessionStore, type CancelOrderToolResult, type ClosePositionToolResult, type CreateHeliosAgentMcpServerOptions, type DeleteTpSlToolResult, type EnsureLoginOptions, type EnsureLoginResult, FileAgentSessionStore, type GetHeliosAgentMcpDocumentInput, HOSTED_RECONNECT_MESSAGE, HeliosAgentMcpAccountService, type HeliosAgentMcpAccountServiceOptions, HeliosAgentMcpAuthService, type HeliosAgentMcpAuthServiceOptions, type HeliosAgentMcpDocsIndex, type HeliosAgentMcpDocsIndexEntry, HeliosAgentMcpDocsService, type HeliosAgentMcpDocsServiceOptions, type HeliosAgentMcpDocument, HeliosAgentMcpLedgerService, type HeliosAgentMcpLedgerServiceOptions, HeliosAgentMcpMarketService, type HeliosAgentMcpMarketServiceOptions, HeliosAgentMcpProviderService, type HeliosAgentMcpProviderServiceOptions, HeliosAgentMcpTradingService, type HeliosAgentMcpTradingServiceOptions, type HeliosMcpToolDefinition, type HeliosMcpToolResult, type LedgerFillsResult, type LedgerSummaryResult, type MarketSnapshotChunkResult, type MarketSnapshotResult, type MarketSymbolDetailResult, MemoryAgentMcpSessionStore, type OpenOrdersToolResult, type OpenPositionsResult, type PendingAgentLogin, type PendingLoginResult, type PollLoginResult, type PortfolioResult, type SetTpSlToolResult, type StartLoginResult, type TradeIntentAction, type TradeIntentActionInput, type TradeIntentActionResult, type WalletStateResult, createHeliosAccountToolDefinitions, createHeliosAgentMcpServer, createHeliosAuthToolDefinitions, createHeliosDocsToolDefinitions, createHeliosLedgerToolDefinitions, createHeliosMarketToolDefinitions, createHeliosProviderToolDefinitions, createHeliosTradingToolDefinitions, formatHeliosLoginPrompt, getDefaultHeliosAgentMcpDocsRoot, getDefaultHeliosAgentMcpSessionPath, pendingAgentLoginSchema, retryAfterUnauthorizedRefresh, toolAnnotations };
2170
+ export { type ActiveProviderView, type AgentMcpSessionStore, type CancelOrderToolResult, type ClosePositionToolResult, type CreateHeliosAgentMcpServerOptions, type DeleteTpSlToolResult, type EnsureLoginOptions, type EnsureLoginResult, FileAgentSessionStore, type GetHeliosAgentMcpDocumentInput, HOSTED_RECONNECT_MESSAGE, HeliosAgentMcpAccountService, type HeliosAgentMcpAccountServiceOptions, HeliosAgentMcpAuthService, type HeliosAgentMcpAuthServiceOptions, type HeliosAgentMcpDocsIndex, type HeliosAgentMcpDocsIndexEntry, HeliosAgentMcpDocsService, type HeliosAgentMcpDocsServiceOptions, type HeliosAgentMcpDocument, HeliosAgentMcpLedgerService, type HeliosAgentMcpLedgerServiceOptions, HeliosAgentMcpMarketService, type HeliosAgentMcpMarketServiceOptions, HeliosAgentMcpProviderService, type HeliosAgentMcpProviderServiceOptions, HeliosAgentMcpTradingService, type HeliosAgentMcpTradingServiceOptions, type HeliosMcpToolDefinition, type HeliosMcpToolResult, type LedgerFillsResult, type LedgerSummaryResult, type MarketSnapshotChunkResult, type MarketSnapshotResult, type MarketSymbolDetailResult, MemoryAgentMcpSessionStore, type OpenOrdersToolResult, type OpenPositionsResult, type PendingAgentLogin, type PendingLoginResult, type PollLoginResult, type PortfolioResult, type SetTpSlToolResult, type StartLoginResult, type TradeIntentAction, type TradeIntentActionInput, type TradeIntentActionResult, type WalletStateResult, createHeliosAccountToolDefinitions, createHeliosAgentMcpServer, createHeliosAuthToolDefinitions, createHeliosDocsToolDefinitions, createHeliosLedgerToolDefinitions, createHeliosMarketToolDefinitions, createHeliosProviderToolDefinitions, createHeliosTradingToolDefinitions, formatHeliosLoginPrompt, getDefaultHeliosAgentMcpDocsRoot, getDefaultHeliosAgentMcpSessionPath, pendingAgentLoginSchema, retryAfterUnauthorizedRefresh, toolAnnotations, withDataText };
package/dist/index.js CHANGED
@@ -55,7 +55,8 @@ __export(index_exports, {
55
55
  getDefaultHeliosAgentMcpSessionPath: () => getDefaultHeliosAgentMcpSessionPath,
56
56
  pendingAgentLoginSchema: () => pendingAgentLoginSchema,
57
57
  retryAfterUnauthorizedRefresh: () => retryAfterUnauthorizedRefresh,
58
- toolAnnotations: () => toolAnnotations
58
+ toolAnnotations: () => toolAnnotations,
59
+ withDataText: () => withDataText
59
60
  });
60
61
  module.exports = __toCommonJS(index_exports);
61
62
 
@@ -254,7 +255,9 @@ var marketSnapshotResolvedScopeSchema = import_zod.z.enum(["selected", "all", "e
254
255
  var marketSnapshotValueSchema = import_zod.z.union([import_zod.z.string(), import_zod.z.number(), import_zod.z.boolean(), import_zod.z.null()]);
255
256
  var marketSnapshotInputSchema = import_zod.z.object({
256
257
  scope: marketSnapshotScopeSchema.optional(),
257
- symbols: import_zod.z.array(import_zod.z.string().min(1)).min(1).optional()
258
+ symbols: import_zod.z.array(import_zod.z.string().min(1)).min(1).optional(),
259
+ fields: import_zod.z.array(import_zod.z.string().min(1)).min(1).optional().describe('Table columns to return, e.g. ["lp","r1h","r24h","hmi","reg","hs"]; sym and base always come back. Omit for all columns.'),
260
+ sort: import_zod.z.enum(["rank"]).optional().describe('"rank" orders rows by market cap rank, unranked last.')
258
261
  });
259
262
  var marketSnapshotChunkInputSchema = marketSnapshotInputSchema.extend({
260
263
  offset: import_zod.z.number().int().nonnegative().optional(),
@@ -2635,7 +2638,7 @@ function createHeliosMarketToolDefinitions(service) {
2635
2638
  {
2636
2639
  name: "helios_market_get_snapshot",
2637
2640
  title: "Get Helios Market Snapshot",
2638
- description: "Returns a compact market snapshot for the selected, all, or explicitly requested symbols.",
2641
+ description: "Returns a compact market snapshot for the selected, all, or explicitly requested symbols. The full table is large; pass fields to get only the columns you need.",
2639
2642
  inputSchema: marketSnapshotInputSchema,
2640
2643
  async execute(input) {
2641
2644
  const result = marketSnapshotToolOutputSchema.parse(await service.getSnapshot(input));
@@ -2903,7 +2906,7 @@ async function createHeliosAgentMcpServer(options) {
2903
2906
  const { McpServer } = await import("@modelcontextprotocol/sdk/server/mcp.js");
2904
2907
  const server = new McpServer({
2905
2908
  name: "helios",
2906
- version: "0.2.1"
2909
+ version: "0.2.3"
2907
2910
  });
2908
2911
  const sessionStore = options.sessionStore ?? new FileAgentSessionStore(options.sessionPath ?? getDefaultHeliosAgentMcpSessionPath());
2909
2912
  const client = new HeliosAgentAuthClient({
@@ -2996,6 +2999,11 @@ function toolAnnotations(name) {
2996
2999
  if (CHANGES_SESSION.test(name)) return { readOnlyHint: false, destructiveHint: false, openWorldHint: false };
2997
3000
  return { readOnlyHint: true, destructiveHint: false, openWorldHint: true };
2998
3001
  }
3002
+ var TEXT_IS_RESULT = /* @__PURE__ */ new Set(["helios_docs_get_document"]);
3003
+ function withDataText(name, content, structuredContent) {
3004
+ if (TEXT_IS_RESULT.has(name)) return content;
3005
+ return [...content, { type: "text", text: JSON.stringify(structuredContent) }];
3006
+ }
2999
3007
  function registerTool(server, tool) {
3000
3008
  server.registerTool(
3001
3009
  tool.name,
@@ -3008,7 +3016,7 @@ function registerTool(server, tool) {
3008
3016
  async (input) => {
3009
3017
  const result = await tool.execute(tool.inputSchema.parse(input));
3010
3018
  return {
3011
- ...result,
3019
+ content: withDataText(tool.name, result.content, result.structuredContent),
3012
3020
  structuredContent: result.structuredContent
3013
3021
  };
3014
3022
  }
@@ -3039,5 +3047,6 @@ function registerTool(server, tool) {
3039
3047
  getDefaultHeliosAgentMcpSessionPath,
3040
3048
  pendingAgentLoginSchema,
3041
3049
  retryAfterUnauthorizedRefresh,
3042
- toolAnnotations
3050
+ toolAnnotations,
3051
+ withDataText
3043
3052
  });
package/dist/index.mjs CHANGED
@@ -22,8 +22,9 @@ import {
22
22
  getDefaultHeliosAgentMcpSessionPath,
23
23
  pendingAgentLoginSchema,
24
24
  retryAfterUnauthorizedRefresh,
25
- toolAnnotations
26
- } from "./chunk-NCF7ASJB.mjs";
25
+ toolAnnotations,
26
+ withDataText
27
+ } from "./chunk-UYCUR7QV.mjs";
27
28
  export {
28
29
  FileAgentSessionStore,
29
30
  HOSTED_RECONNECT_MESSAGE,
@@ -48,5 +49,6 @@ export {
48
49
  getDefaultHeliosAgentMcpSessionPath,
49
50
  pendingAgentLoginSchema,
50
51
  retryAfterUnauthorizedRefresh,
51
- toolAnnotations
52
+ toolAnnotations,
53
+ withDataText
52
54
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pgnio/helios-mcp",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "Helios MCP server: connect an AI agent to your Helios account to read markets and your portfolio and to trade on Hyperliquid. Most apps can use the hosted URL https://helios.pgn.io/mcp instead.",
5
5
  "license": "UNLICENSED",
6
6
  "homepage": "https://helios.pgn.io/?connect=ai",