Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:

  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

Feature performance profiling via MCP

Derek_Van_Allen_BD
Derek_Van_Allen_BD Member Posts: 1,171 PRO

This weekend I cracked the seal on using the MCP service for my vibe coded featurescript exploits and one big blind spot in the tools right now is there doesn't seem to be a way to feed feature performance metrics back to the LLM for it to read hot function calls and realize that it's chosen some O(N)^3 way to tackle a problem instead of a much more reasonable O(NlogN) function that does the same thing through a more clever data structure. Some of these instances can be litigated offline and will come up during normal code review, but there's a tendency with LLMs to use the server side round trip time for a rebuild response as evidence of build performance and those two things have almost nothing to do with one another.

I've already started to shift some of my workflow over to using a Playwright browser session that exposes the performance profiling data straight back into Claude and it's been paying dividends correcting assumptions of function speeds and making some of my 13,000 line utils block a little more close to usable for the features I've been developing them for.

I'm not sure where the team at Onshape stand with using the MCP and API for this kind of thing versus browser injection, but doing it this way is a much better alternative to copy - paste - read - screenshot - reprompt.

Comments

  • S1mon
    S1mon Member Posts: 4,648 PRO

    Yep. I found the same thing. It seems odd, but using the browser is more powerful - we can get profiling - and doesn't burn tokens. A while ago ChatGPT and I went back and forth and it figured out how to read the profiling info through the browser and target offending functions for performance improvements. This should be part of the MCP functions.

    Simon Gatrall | Product Development, Engineering, Design, Onshape | Ex- IDEO, PCH, Unagi, Carbon | LinkedIn

  • MichaelPascoe
    MichaelPascoe Member Posts: 2,968 PRO

    mcp has tons of potential. hindered by annual limit and lack of functionality. will have to make my own "mcp" that gives it full user control via browser.. seems like the only way around the annual limit and functionality limits. might require a custom browser based on past tests.


    RENDERCAD - Photorealistic product rendering.
    CADSharp - Professional CAD + software consulting.

    ▚▞▚▞▚▞▚▞▚