An Event-Driven Multi-Agent Workflow for Microscopy Data Analysis Using the Model Context Protocol

preprint OA: closed
Full text JSON View at publisher
Full text 12,385 characters · extracted from preprint-html · click to expand
An Event-Driven Multi-Agent Workflow for Microscopy Data Analysis Using the Model Context Protocol | Research Square window.SnipcartSettings = { analytics: { enabled: false } }; (function() { var accessVector = localStorage.getItem('access_vector') || ''; window.dataLayer = window.dataLayer || []; if (accessVector) { window.dataLayer.push({ user: { profile: { profileInfo: { snid: accessVector } } } }); } })(); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-K279D39R'); Browse Preprints In Review Journals COVID-19 Preprints AJE Video Bytes Research Tools Research Promotion AJE Professional Editing AJE Rubriq About Preprint Platform In Review Editorial Policies Our Team Advisory Board Help Center Sign In Submit a Preprint Cite Share Download PDF Research Article An Event-Driven Multi-Agent Workflow for Microscopy Data Analysis Using the Model Context Protocol Meng Zhao, Anton Gladyshev, Sherjeel Shabih, Christoph T. Koch This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-9158958/v1 This work is licensed under a CC BY 4.0 License Status: Posted Version 1 posted You are reading this latest preprint version Abstract Advanced electron microscopy increasingly depends on data-intensive acquisition modes and specialized post-processing workflows that remain difficult to access for non-expert users. Although recent large language model (LLM) systems offer new possibilities for lowering these barriers, their deployment in scientific workflows is limited by unreliable parameter handling and hallucinated function inputs. Here, we present an event-driven multi-agent framework for microscopy data analysis based on the Model Context Protocol (MCP), implemented as a plugin in the open-source platform Nion Swift. The system integrates a graphical user interface, MCP-based tool orchestration, and LLM agents, enabling both direct manual operation and LLM-guided workflow execution within a unified architecture. To address hallucination in critical workflow stages, we introduce a structured parameter-checking strategy in which mandatory parameters are explicitly marked as undefined and must be obtained from the user before execution. In contrast, non-critical parameters are managed through default assignments and retrieval-augmented generation (RAG)-based explanations, allowing the system to remain flexible as underlying scientific software evolves. As a representative use case, we apply the framework to ptychographic experiments, covering parameter recommendation, acquisition support, preprocessing, and server-side reconstruction. Evaluation on 100 simulated non-expert prompts shows that explicit parameter checking substantially improves robustness and enables consistently reliable function execution across multiple LLM families. These results demonstrate that combining event-driven multi-agent design with explicit parameter validation provides a practical foundation for accessible and trustworthy LLM-assisted microscopy workflows. Computational Physics ptychography electron microscopy large language models event-driven multi-agent workflow Model Context Protocol parameter validation hallucination mitigation Full Text Additional Declarations The authors declare no competing interests. Cite Share Download PDF Status: Posted Version 1 posted You are reading this latest preprint version Research Square lets you share your work early, gain feedback from the community, and start making changes to your manuscript prior to peer review in a journal. As a division of Research Square Company, we’re committed to making research communication faster, fairer, and more useful. We do this by developing innovative software and high quality services for the global research community. Our growing team is made up of researchers and industry professionals working together to solve the most critical problems facing scientific publishing. Also discoverable on Platform About Our Team In Review Editorial Policies Advisory Board Help Center Resources Author Services Accessibility API Access RSS feed Manage Cookie Preferences © Research Square 2026 | ISSN 2693-5015 (online) Privacy Policy Terms of Service Do Not Sell My Personal Information {"props":{"pageProps":{"initialData":{"identity":"rs-9158958","acceptedTermsAndConditions":true,"allowDirectSubmit":true,"archivedVersions":[],"articleType":"Research Article","associatedPublications":[],"authors":[{"id":608251329,"identity":"09c7f0e0-624c-40bb-9fc1-2f406248a471","order_by":0,"name":"Meng Zhao","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAABMUlEQVRIiWNgGAWjYDACCSjNz8ADJA0SGAwYGNiALAswF68WyQZULRKEtRgcAKlhQGhhwKVFfnbzw0c3Ku7Ibr7de0zyR0Eag7lEAtuDj3skZMwZmDc+wKKFcc4xY+OcM8+Mt905lybNY5DDYDkjgd1wxjMJHssGtmJs1jBLJJhJ57YdTtx2I8dMmsGggsHgRv43aZ4DEjxAp5pJYNHCJpH+TTr33+HEzTNyzCR/gLUksEn/gWgx/4FFC48E0PDchsOJG4AMCZDDwFoYoLZgDTCJnGLjnGOHjWfcOWNszWOQxmNw5gG7YQ9Iy2G2YmwOk5+RvvFxTs1h2f7ZPYY3f/xJljM4DgyxHwds7A2ON2/8gM0aWMg1SDCwgMzkQQoaPOqhWpjxmTkKRsEoGAUjGAAA7Htgoxy0QyUAAAAASUVORK5CYII=","orcid":"https://orcid.org/0009-0006-8299-0053","institution":"Humboldt University of Berlin","correspondingAuthor":true,"prefix":"","firstName":"Meng","middleName":"","lastName":"Zhao","suffix":""},{"id":608252147,"identity":"3df37a46-81da-4d75-8496-fcbfc0c4ce6f","order_by":1,"name":"Anton Gladyshev","email":"","orcid":"","institution":"Humboldt University of Berlin","correspondingAuthor":false,"prefix":"","firstName":"Anton","middleName":"","lastName":"Gladyshev","suffix":""},{"id":608252148,"identity":"ec33ac9b-16d6-4c24-b37b-205511726661","order_by":2,"name":"Sherjeel Shabih","email":"","orcid":"","institution":"Humboldt University of Berlin","correspondingAuthor":false,"prefix":"","firstName":"Sherjeel","middleName":"","lastName":"Shabih","suffix":""},{"id":608252149,"identity":"2503933f-93dc-4d92-93e9-4e40cde34295","order_by":3,"name":"Christoph T. Koch","email":"","orcid":"","institution":"Humboldt University of Berlin","correspondingAuthor":false,"prefix":"","firstName":"Christoph","middleName":"T.","lastName":"Koch","suffix":""}],"badges":[],"createdAt":"2026-03-18 11:47:55","currentVersionCode":1,"declarations":{"humanSubjects":false,"vertebrateSubjects":false,"conflictsOfInterestStatement":false,"humanSubjectEthicalGuidelines":false,"humanSubjectConsent":false,"humanSubjectClinicalTrial":false,"humanSubjectCaseReport":false,"vertebrateSubjectEthicalGuidelines":false},"doi":"10.21203/rs.3.rs-9158958/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-9158958/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":104949650,"identity":"9163341a-016a-41ce-9a25-465b41aa95d6","added_by":"auto","created_at":"2026-03-19 06:27:41","extension":"pdf","order_by":1,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":490861,"visible":true,"origin":"","legend":"","description":"","filename":"LLMdrivenagentforscientificsoftwares.pdf","url":"https://assets-eu.researchsquare.com/files/rs-9158958/v1_covered_356ec2c7-136c-4b63-9e36-352a3bfc15c8.pdf"}],"financialInterests":"The authors declare no competing interests.","formattedTitle":"\u003cp\u003eAn Event-Driven Multi-Agent Workflow for Microscopy Data Analysis Using the Model Context Protocol\u003c/p\u003e","fulltext":[],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":false,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":true,"hideJournal":true,"highlight":"","institution":"Humboldt University of Berlin","isAcceptedByJournal":false,"isAuthorSuppliedPdf":true,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":false,"isPdf":true,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true},"keywords":"ptychography, electron microscopy, large language models, event-driven multi-agent workflow, Model Context Protocol, parameter validation, hallucination mitigation","lastPublishedDoi":"10.21203/rs.3.rs-9158958/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-9158958/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"\u003cp\u003eAdvanced electron microscopy increasingly depends on data-intensive acquisition modes and specialized post-processing workflows that remain difficult to access for non-expert users. Although recent large language model (LLM) systems offer new possibilities for lowering these barriers, their deployment in scientific workflows is limited by unreliable parameter handling and hallucinated function inputs. Here, we present an event-driven multi-agent framework for microscopy data analysis based on the Model Context Protocol (MCP), implemented as a plugin in the open-source platform Nion Swift. The system integrates a graphical user interface, MCP-based tool orchestration, and LLM agents, enabling both direct manual operation and LLM-guided workflow execution within a unified architecture.\u003c/p\u003e\n\u003cp\u003eTo address hallucination in critical workflow stages, we introduce a structured parameter-checking strategy in which mandatory parameters are explicitly marked as undefined and must be obtained from the user before execution. In contrast, non-critical parameters are managed through default assignments and retrieval-augmented generation (RAG)-based explanations, allowing the system to remain flexible as underlying scientific software evolves. As a representative use case, we apply the framework to ptychographic experiments, covering parameter recommendation, acquisition support, preprocessing, and server-side reconstruction. Evaluation on 100 simulated non-expert prompts shows that explicit parameter checking substantially improves robustness and enables consistently reliable function execution across multiple LLM families. These results demonstrate that combining event-driven multi-agent design with explicit parameter validation provides a practical foundation for accessible and trustworthy LLM-assisted microscopy workflows.\u003c/p\u003e","manuscriptTitle":"An Event-Driven Multi-Agent Workflow for Microscopy Data Analysis Using the Model Context Protocol","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2026-03-19 06:26:45","doi":"10.21203/rs.3.rs-9158958/v1","editorialEvents":[{"type":"communityComments","content":0}],"status":"published","journal":{"display":true,"email":"[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true}}],"origin":"","ownerIdentity":"da8e6ae6-b585-41be-b57c-7e37e74b1397","owner":[],"postedDate":"March 19th, 2026","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"posted","subjectAreas":[{"id":64724674,"name":"Computational Physics"}],"tags":[],"updatedAt":"2026-03-19T06:26:45+00:00","versionOfRecord":[],"versionCreatedAt":"2026-03-19 06:26:45","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-9158958","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-9158958","identity":"rs-9158958","version":["v1"]},"buildId":"XKTyCvWXoU3ODBz1xrDgd","isFallback":false,"isExperimentalCompile":false,"dynamicIds":[84888],"gssp":true,"scriptLoader":[]}

Text is read by the "Ask this paper" AI Q&A widget below. Extraction quality varies by source — PMC NXML preserves structure cleanly, OA-HTML may include some navigation residue, and OA-PDF can have broken hyphenation. The publisher copy (via DOI) is the canonical version.

My notes (saved in your browser only)

Ask this paper AI returns verbatim quotes from the full text · source: preprint-html

Answers must be backed by verbatim quotes from this paper's full text. Hallucinated quotes are dropped automatically; if no verbatim passage answers the question, we say so. How this works

Citation neighborhood (no data yet)

We don't have any in-corpus citations linked to this paper yet. This is a recent paper (2026) — citers typically take a year or two to land, and the OpenAlex reference graph may still be filling in.

Source provenance

europepmc
last seen: 2026-05-20T01:45:00.602351+00:00