Add a tool for raw measurement values to the WATS MCP server
Under reviewI have been experimenting with the WATS MCP server, and found it great for aggregated analysis: yield, Pareto, step statistics, Cpk and trends. But it cannot return raw measurement values in bulk.
Some analyses need raw values. Examples: a histogram of one step, a scatter plot of two steps on the same unit, or a statistic that the server does not calculate. For these, the only MCP method is to open reports one at a time with `TestReportViewer`. This is slow and uses many tokens.
Example
I wanted a histogram of one numeric step across approximately 1,000 reports. Through MCP:
1. `FindTestReports` returns only the 20 newest reports and has no paging. To list all reports, I
had to split the date range into many small windows.
2. `TestReportViewer` returns the full report. I needed 4 values, but I got all steps. That is
5,000–9,000 tokens for each report.
A sample of 58 reports took 86 tool calls and approximately 500,000 tokens. All reports would take approximately 1,100 calls and 8–9 million tokens. Thus I used the REST API. But the REST API needs a separate API token, and the MCP OAuth login should make that unnecessary. I also found no way to limit the scope of the API token to only the endpoints I need, so I am scared to hand it out to an llm-harness in case it is used for something unintended.
Request: A `GetMeasurements` tool
The REST API already has `POST /api/App/Measurements`. I would like that endpoint wrapped as an MCP tool, so that a user can ask: "Show me the histogram of step `V3.3USB (L3/2)`".
- Input: part number, test operation, a list of step paths, and the
usual filters (date, run, status, station, revision, serial number, SW version, level, misc info).
Let `run` accept "all runs". Add a maximum count and paging.
- Output: one row for each report and step path. Include report ID, serial number, start time,
run, report status, station, operator, step path, value, unit, limits, comparison operator and step status.
10,000+ rows do not fit in a model context, so do not put the rows in the response. Return a short summary (row count, min, max, quantiles) and a link to a CSV or JSON file.
Why
With MCP, a user can ask: "Which step causes the most FPY loss? Show me its distribution." This should work in one session, with no API tokens. Raw measurements are the missing part. With them, an assistant can make histograms, find correlations between steps, and calculate custom statistics. It uses only data that the user already has access to.
Please sign in to leave a comment.
Comments
0 comments