Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified docs/images/full-featured-main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/full-featured-panel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed examples/Full Featured MCP Server/Add Stock Price.vi
Binary file not shown.
Binary file not shown.
Binary file modified examples/Full Featured MCP Server/Buy Any.vi
Binary file not shown.
Binary file modified examples/Full Featured MCP Server/Buy Stock.vi
Binary file not shown.
Binary file modified examples/Full Featured MCP Server/Find Best Trending Stock.vi
Binary file not shown.
63 changes: 58 additions & 5 deletions examples/Full Featured MCP Server/Full Featured MCP Server.lvlib
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,78 @@
<Property Name="NI.Lib.Icon" Type="Bin">)!#!!!!!!!)!"1!&amp;!!!-!%!!!@````]!!!!"!!%!!!(^!!!*Q(C=\&gt;8"&lt;2MR%!813:"$A*T51;!7JA7VI";G"6V^6!P4AFJ1#^/#7F!,TN/'-(++=IC2(-TVS+O`80+:3[QDNP9VYEO]0GP@@NM_LD_\`K4&amp;2`NI`\;^0.WE\\ZH0]8D2;2'N3K6]:DK&gt;?1D(`H)2T\SFL?]Z3VP?=N,8P+3F\TE*5^ZSF/?]J3H@$PE)1^ZS*('Z'/C-?A99(2'C@%R0--T0-0D;QT0]!T0]!S0,D%]QT-]QT-]&lt;IPB':\B':\B-&gt;1GG?W1]QS0Y;.ZGK&gt;ZGK&gt;Z4"H.UQ"NMD:Q'Q1DWM6WUDT.UTR/IXG;JXG;JXF=DO:JHO:JHO:RS\9KP7E?BZT(-&amp;%]R6-]R6-]BI\C+:\C+:\C-6U54`%52*GQ$)Y1Z;&lt;3I8QJHO,R+YKH?)KH?)L(J?U*V&lt;9S$]XDE0-E4`)E4`)EDS%C?:)H?:)H?1Q&lt;S:-]S:-]S7/K3*\E3:Y%3:/;0N*A[=&lt;5+18*YW@&lt;,&lt;E^J&gt;YEO2U2;`0'WJ3R.FOM422L=]2[[,%?:KS(&amp;'PR9SVKL-7+N1CR`LB9[&amp;C97*0%OPH2-?Y_&lt;_KK,OKM4OKI$GKP&gt;I^&lt;`X,(_`U?N^MNLN&gt;L8#[8/*`0=4K&gt;YHA]RO&amp;QC0V_(\P&gt;\OUV].XR^E,Y_6Z[=@YH^5\`3`_$&gt;W.]DF`(N59`!/&lt;!-PQ!!!!!</Property>
<Property Name="NI.Lib.Version" Type="Str">1.0.0.0</Property>
<Property Name="NI.LV.All.SourceOnly" Type="Bool">true</Property>
<Item Name="ctls" Type="Folder">
<Item Name="Server Data.ctl" Type="VI" URL="../Server Data.ctl"/>
<Item Name="Server FGV Modes.ctl" Type="VI" URL="../Server FGV Modes.ctl"/>
</Item>
<Item Name="SubVIs" Type="Folder">
<Item Name="Market" Type="Folder">
<Item Name="Catalogues" Type="Folder">
<Item Name="Event Catalogue.vi" Type="VI" URL="../Market/Event Catalogue.vi"/>
<Item Name="Stock Catalogue.vi" Type="VI" URL="../Market/Stock Catalogue.vi"/>
<Item Name="Stock Names.vi" Type="VI" URL="../Market/Stock Names.vi"/>
<Item Name="Story Catalogue.vi" Type="VI" URL="../Market/Story Catalogue.vi"/>
</Item>
<Item Name="Engine" Type="Folder">
<Item Name="Advance Stories.vi" Type="VI" URL="../Market/Advance Stories.vi"/>
<Item Name="Apply Event.vi" Type="VI" URL="../Market/Apply Event.vi"/>
<Item Name="Corporate Actions.vi" Type="VI" URL="../Market/Corporate Actions.vi"/>
<Item Name="Initialise Market.vi" Type="VI" URL="../Market/Initialise Market.vi"/>
<Item Name="Move Prices.vi" Type="VI" URL="../Market/Move Prices.vi"/>
<Item Name="Publish Random Event.vi" Type="VI" URL="../Market/Publish Random Event.vi"/>
<Item Name="Report Earnings.vi" Type="VI" URL="../Market/Report Earnings.vi"/>
<Item Name="Simulate Market Tick.vi" Type="VI" URL="../Market/Simulate Market Tick.vi"/>
<Item Name="Start Story.vi" Type="VI" URL="../Market/Start Story.vi"/>
<Item Name="Update Market Mood.vi" Type="VI" URL="../Market/Update Market Mood.vi"/>
</Item>
<Item Name="Helpers" Type="Folder">
<Item Name="Add News.vi" Type="VI" URL="../Market/Add News.vi"/>
<Item Name="Append Price.vi" Type="VI" URL="../Market/Append Price.vi"/>
<Item Name="Check Order.vi" Type="VI" URL="../Market/Check Order.vi"/>
<Item Name="Draw Price Chart.vi" Type="VI" URL="../Market/Draw Price Chart.vi"/>
<Item Name="Event Hits.vi" Type="VI" URL="../Market/Event Hits.vi"/>
<Item Name="Good Outcome.vi" Type="VI" URL="../Market/Good Outcome.vi"/>
<Item Name="Indexed History.vi" Type="VI" URL="../Market/Indexed History.vi"/>
<Item Name="Market Clock.vi" Type="VI" URL="../Market/Market Clock.vi"/>
<Item Name="News Impact.vi" Type="VI" URL="../Market/News Impact.vi"/>
<Item Name="News Ticker Text.vi" Type="VI" URL="../Market/News Ticker Text.vi"/>
<Item Name="Percent Change.vi" Type="VI" URL="../Market/Percent Change.vi"/>
<Item Name="Pick Other Stock.vi" Type="VI" URL="../Market/Pick Other Stock.vi"/>
<Item Name="Price Return.vi" Type="VI" URL="../Market/Price Return.vi"/>
<Item Name="Prices At.vi" Type="VI" URL="../Market/Prices At.vi"/>
<Item Name="Random Chance.vi" Type="VI" URL="../Market/Random Chance.vi"/>
<Item Name="Random Integer.vi" Type="VI" URL="../Market/Random Integer.vi"/>
<Item Name="Round To Cents.vi" Type="VI" URL="../Market/Round To Cents.vi"/>
<Item Name="Schedule Step.vi" Type="VI" URL="../Market/Schedule Step.vi"/>
<Item Name="Standard Normal.vi" Type="VI" URL="../Market/Standard Normal.vi"/>
<Item Name="Trade Stock.vi" Type="VI" URL="../Market/Trade Stock.vi"/>
<Item Name="Write Headline.vi" Type="VI" URL="../Market/Write Headline.vi"/>
</Item>
<Item Name="Typedefs" Type="Folder">
<Item Name="Event Template.ctl" Type="VI" URL="../Market/Event Template.ctl"/>
<Item Name="Market Mode.ctl" Type="VI" URL="../Market/Market Mode.ctl"/>
<Item Name="Market State.ctl" Type="VI" URL="../Market/Market State.ctl"/>
<Item Name="News Item.ctl" Type="VI" URL="../Market/News Item.ctl"/>
<Item Name="Stock Entry.ctl" Type="VI" URL="../Market/Stock Entry.ctl"/>
<Item Name="Story Step.ctl" Type="VI" URL="../Market/Story Step.ctl"/>
</Item>
</Item>
<Item Name="Prompts" Type="Folder">
<Item Name="Buy Any.vi" Type="VI" URL="../Buy Any.vi"/>
<Item Name="Find Best Trending Stock.vi" Type="VI" URL="../Find Best Trending Stock.vi"/>
</Item>
<Item Name="tools" Type="Folder">
<Item Name="Buy Stock.vi" Type="VI" URL="../Buy Stock.vi"/>
<Item Name="Get History Chart.vi" Type="VI" URL="../Get History Chart.vi"/>
<Item Name="Get Market Summary.vi" Type="VI" URL="../Get Market Summary.vi"/>
<Item Name="Get News.vi" Type="VI" URL="../Get News.vi"/>
<Item Name="Get Owned Stocks.vi" Type="VI" URL="../Get Owned Stocks.vi"/>
<Item Name="Get Stock Info.vi" Type="VI" URL="../Get Stock Info.vi"/>
<Item Name="Get Stock Names.vi" Type="VI" URL="../Get Stock Names.vi"/>
<Item Name="Get Stock Prices.vi" Type="VI" URL="../Get Stock Prices.vi"/>
<Item Name="Get Wallet.vi" Type="VI" URL="../Get Wallet.vi"/>
<Item Name="Sell Stock.vi" Type="VI" URL="../Sell Stock.vi"/>
</Item>
<Item Name="Add Stock Price.vi" Type="VI" URL="../Add Stock Price.vi"/>
<Item Name="Advance Market.vi" Type="VI" URL="../Advance Market.vi"/>
<Item Name="Server FGV.vi" Type="VI" URL="../Server FGV.vi"/>
<Item Name="Start Market.vi" Type="VI" URL="../Start Market.vi"/>
<Item Name="Trim MCP Log.vi" Type="VI" URL="../Trim MCP Log.vi"/>
</Item>
<Item Name="main.vi" Type="VI" URL="../main.vi"/>
</Library>
Binary file modified examples/Full Featured MCP Server/Get History Chart.vi
Binary file not shown.
Binary file not shown.
Binary file added examples/Full Featured MCP Server/Get News.vi
Binary file not shown.
Binary file modified examples/Full Featured MCP Server/Get Owned Stocks.vi
Binary file not shown.
Binary file not shown.
Binary file modified examples/Full Featured MCP Server/Get Stock Names.vi
Binary file not shown.
Binary file modified examples/Full Featured MCP Server/Get Stock Prices.vi
Binary file not shown.
Binary file modified examples/Full Featured MCP Server/Get Wallet.vi
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added examples/Full Featured MCP Server/Sell Stock.vi
Binary file not shown.
Binary file removed examples/Full Featured MCP Server/Server Data.ctl
Binary file not shown.
Binary file not shown.
Binary file modified examples/Full Featured MCP Server/Server FGV.vi
Binary file not shown.
Binary file added examples/Full Featured MCP Server/Start Market.vi
Binary file not shown.
Binary file added examples/Full Featured MCP Server/Trim MCP Log.vi
Binary file not shown.
Binary file modified examples/Full Featured MCP Server/main.vi
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,8 @@ When the user asks about the stocks (e.g., *Spaghetti Code Holdings* or *PXI Cha
* If the price is **up**: Claim it's because they finally cleaned up their shift registers or properly unbundled their clusters.
* If the price is **down**: Blame it on a "missing driver," a "circular dependency," or someone forgetting to close a reference.

* **Read before you judge:** call get_stock_info and read the company descriptions, and call get_news for the latest headlines. A stock whose description smells of spaghetti does not become a good design because the chart went up for a minute.
* **News move prices:** check move_since_percent to see whether a headline is already wired into the price, and watch stories that are still unfolding (rumour, inquiry, tender): the last frame of the sequence has not executed yet.

**Sample Output Style:**
> *"Look, if you want to buy 'Infinite While Loop Inc.', that's your funeral. The logic clearly has no stop button wired. It's going to run until it consumes all your RAM (money). I'd pivot to 'TestStand Sequence Sprawl'—ugly architecture, but it pays dividends whenever someone is too lazy to code their own test harness."*
21 changes: 16 additions & 5 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,11 +324,22 @@ it from the **+** menu.
### Full Featured MCP Server

A simulated stock broker that uses every kind of building block: tools to look
up prices, show a history chart and buy stocks; prompts such as "find the best
trending stock"; and a resource that makes the assistant act as a stock market
expert. The MCP log on the front panel shows every request the client sends.

![Front panel of the Full Featured example: stock price chart and MCP log](docs/images/full-featured-panel.png)
up prices, read company descriptions and news, show a history chart and buy or
sell stocks; prompts such as "find the best trending stock"; and a resource that
makes the assistant act as a stock market expert. The MCP log on the front panel
shows every request the client sends.

The market behind it is a small simulation: 20 stocks with a short description
each (some companies are solid, some are not, and the description hints at
which), prices that follow a trend plus the mood of the market, and news that
move them. Some news are single events, others are stories that unfold over a
few minutes with an uncertain ending, such as a takeover rumour or an audit.
The assistant reads all of it with `get_stock_info` and `get_news` and trades
with `buy_stock` and `sell_stock`. The chart on the front panel shows the last
ten minutes of every stock, scaled so each curve starts at 100, and the news
ticker below it shows the latest headlines.

![Front panel of the Full Featured example: stock price chart, MCP log and news ticker](docs/images/full-featured-panel.png)

![Block diagram of the Full Featured example](docs/images/full-featured-main.png)

Expand Down