Skip to content

Commit 234a727

Browse files
committed
Fix tool output
1 parent 25e5ec1 commit 234a727

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

financial-analyst-deepseek/server.py

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,20 +53,10 @@ def save_code(code: str) -> str:
5353
@mcp.tool()
5454
def run_code_and_show_plot() -> str:
5555
"""
56-
Run the code in stock_analysis.py and save the plot to a file plot.png
57-
58-
Args:
59-
None
60-
61-
Returns:
62-
str: A message indicating the plot was saved successfully.
56+
Run the code in stock_analysis.py and generate the plot
6357
"""
64-
try:
65-
with open('stock_analysis.py', 'r') as f:
66-
exec(f.read())
67-
return "Plot saved successfully to plot.png"
68-
except Exception as e:
69-
return f"Error: {e}"
58+
with open('stock_analysis.py', 'r') as f:
59+
exec(f.read())
7060

7161
# Run the server locally
7262
if __name__ == "__main__":

0 commit comments

Comments
 (0)