@cyanheads/pubmed-mcp-server 1.3.4 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -21
- package/dist/config/index.d.ts +10 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +69 -12
- package/dist/config/index.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -0
- package/dist/mcp-server/core/managedMcpServer.d.ts +48 -0
- package/dist/mcp-server/core/managedMcpServer.d.ts.map +1 -0
- package/dist/mcp-server/core/managedMcpServer.js +58 -0
- package/dist/mcp-server/core/managedMcpServer.js.map +1 -0
- package/dist/mcp-server/server.d.ts +1 -0
- package/dist/mcp-server/server.d.ts.map +1 -0
- package/dist/mcp-server/server.js +12 -11
- package/dist/mcp-server/server.js.map +1 -0
- package/dist/mcp-server/tools/pubmedArticleConnections/index.d.ts +7 -0
- package/dist/mcp-server/tools/pubmedArticleConnections/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/pubmedArticleConnections/index.js +7 -0
- package/dist/mcp-server/tools/pubmedArticleConnections/index.js.map +1 -0
- package/dist/mcp-server/tools/pubmedArticleConnections/logic/citationFormatter.d.ts +10 -0
- package/dist/mcp-server/tools/pubmedArticleConnections/logic/citationFormatter.d.ts.map +1 -0
- package/dist/mcp-server/tools/{getPubMedArticleConnections → pubmedArticleConnections}/logic/citationFormatter.js +3 -2
- package/dist/mcp-server/tools/pubmedArticleConnections/logic/citationFormatter.js.map +1 -0
- package/dist/mcp-server/tools/pubmedArticleConnections/logic/elinkHandler.d.ts +10 -0
- package/dist/mcp-server/tools/pubmedArticleConnections/logic/elinkHandler.d.ts.map +1 -0
- package/dist/mcp-server/tools/{getPubMedArticleConnections → pubmedArticleConnections}/logic/elinkHandler.js +3 -2
- package/dist/mcp-server/tools/pubmedArticleConnections/logic/elinkHandler.js.map +1 -0
- package/dist/mcp-server/tools/{getPubMedArticleConnections → pubmedArticleConnections}/logic/index.d.ts +10 -9
- package/dist/mcp-server/tools/pubmedArticleConnections/logic/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/{getPubMedArticleConnections → pubmedArticleConnections}/logic/index.js +15 -14
- package/dist/mcp-server/tools/pubmedArticleConnections/logic/index.js.map +1 -0
- package/dist/mcp-server/tools/{getPubMedArticleConnections → pubmedArticleConnections}/logic/types.d.ts +5 -4
- package/dist/mcp-server/tools/pubmedArticleConnections/logic/types.d.ts.map +1 -0
- package/dist/mcp-server/tools/pubmedArticleConnections/logic/types.js +6 -0
- package/dist/mcp-server/tools/pubmedArticleConnections/logic/types.js.map +1 -0
- package/dist/mcp-server/tools/pubmedArticleConnections/registration.d.ts +12 -0
- package/dist/mcp-server/tools/pubmedArticleConnections/registration.d.ts.map +1 -0
- package/dist/mcp-server/tools/{getPubMedArticleConnections → pubmedArticleConnections}/registration.js +12 -11
- package/dist/mcp-server/tools/pubmedArticleConnections/registration.js.map +1 -0
- package/dist/mcp-server/tools/pubmedFetchContents/index.d.ts +7 -0
- package/dist/mcp-server/tools/pubmedFetchContents/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/pubmedFetchContents/index.js +7 -0
- package/dist/mcp-server/tools/pubmedFetchContents/index.js.map +1 -0
- package/dist/mcp-server/tools/{fetchPubMedContent → pubmedFetchContents}/logic.d.ts +7 -6
- package/dist/mcp-server/tools/pubmedFetchContents/logic.d.ts.map +1 -0
- package/dist/mcp-server/tools/{fetchPubMedContent → pubmedFetchContents}/logic.js +20 -19
- package/dist/mcp-server/tools/pubmedFetchContents/logic.js.map +1 -0
- package/dist/mcp-server/tools/pubmedFetchContents/registration.d.ts +11 -0
- package/dist/mcp-server/tools/pubmedFetchContents/registration.d.ts.map +1 -0
- package/dist/mcp-server/tools/{fetchPubMedContent → pubmedFetchContents}/registration.js +13 -12
- package/dist/mcp-server/tools/pubmedFetchContents/registration.js.map +1 -0
- package/dist/mcp-server/tools/{generatePubMedChart → pubmedGenerateChart}/index.d.ts +3 -2
- package/dist/mcp-server/tools/pubmedGenerateChart/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/{generatePubMedChart → pubmedGenerateChart}/index.js +3 -2
- package/dist/mcp-server/tools/pubmedGenerateChart/index.js.map +1 -0
- package/dist/mcp-server/tools/{generatePubMedChart → pubmedGenerateChart}/logic.d.ts +5 -4
- package/dist/mcp-server/tools/pubmedGenerateChart/logic.d.ts.map +1 -0
- package/dist/mcp-server/tools/{generatePubMedChart → pubmedGenerateChart}/logic.js +15 -14
- package/dist/mcp-server/tools/pubmedGenerateChart/logic.js.map +1 -0
- package/dist/mcp-server/tools/pubmedGenerateChart/registration.d.ts +8 -0
- package/dist/mcp-server/tools/pubmedGenerateChart/registration.d.ts.map +1 -0
- package/dist/mcp-server/tools/{generatePubMedChart → pubmedGenerateChart}/registration.js +10 -13
- package/dist/mcp-server/tools/pubmedGenerateChart/registration.js.map +1 -0
- package/dist/mcp-server/tools/pubmedResearchAgent/index.d.ts +1 -0
- package/dist/mcp-server/tools/pubmedResearchAgent/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/pubmedResearchAgent/index.js +1 -0
- package/dist/mcp-server/tools/pubmedResearchAgent/index.js.map +1 -0
- package/dist/mcp-server/tools/pubmedResearchAgent/logic/index.d.ts +1 -0
- package/dist/mcp-server/tools/pubmedResearchAgent/logic/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/pubmedResearchAgent/logic/index.js +1 -0
- package/dist/mcp-server/tools/pubmedResearchAgent/logic/index.js.map +1 -0
- package/dist/mcp-server/tools/pubmedResearchAgent/logic/inputSchema.d.ts +1 -0
- package/dist/mcp-server/tools/pubmedResearchAgent/logic/inputSchema.d.ts.map +1 -0
- package/dist/mcp-server/tools/pubmedResearchAgent/logic/inputSchema.js +1 -0
- package/dist/mcp-server/tools/pubmedResearchAgent/logic/inputSchema.js.map +1 -0
- package/dist/mcp-server/tools/pubmedResearchAgent/logic/outputTypes.d.ts +1 -0
- package/dist/mcp-server/tools/pubmedResearchAgent/logic/outputTypes.d.ts.map +1 -0
- package/dist/mcp-server/tools/pubmedResearchAgent/logic/outputTypes.js +1 -0
- package/dist/mcp-server/tools/pubmedResearchAgent/logic/outputTypes.js.map +1 -0
- package/dist/mcp-server/tools/pubmedResearchAgent/logic/planOrchestrator.d.ts +1 -0
- package/dist/mcp-server/tools/pubmedResearchAgent/logic/planOrchestrator.d.ts.map +1 -0
- package/dist/mcp-server/tools/pubmedResearchAgent/logic/planOrchestrator.js +1 -0
- package/dist/mcp-server/tools/pubmedResearchAgent/logic/planOrchestrator.js.map +1 -0
- package/dist/mcp-server/tools/pubmedResearchAgent/logic.d.ts +1 -0
- package/dist/mcp-server/tools/pubmedResearchAgent/logic.d.ts.map +1 -0
- package/dist/mcp-server/tools/pubmedResearchAgent/logic.js +1 -0
- package/dist/mcp-server/tools/pubmedResearchAgent/logic.js.map +1 -0
- package/dist/mcp-server/tools/pubmedResearchAgent/registration.d.ts +1 -0
- package/dist/mcp-server/tools/pubmedResearchAgent/registration.d.ts.map +1 -0
- package/dist/mcp-server/tools/pubmedResearchAgent/registration.js +1 -0
- package/dist/mcp-server/tools/pubmedResearchAgent/registration.js.map +1 -0
- package/dist/mcp-server/tools/pubmedSearchArticles/index.d.ts +7 -0
- package/dist/mcp-server/tools/pubmedSearchArticles/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/pubmedSearchArticles/index.js +7 -0
- package/dist/mcp-server/tools/pubmedSearchArticles/index.js.map +1 -0
- package/dist/mcp-server/tools/{searchPubMedArticles → pubmedSearchArticles}/logic.d.ts +8 -7
- package/dist/mcp-server/tools/pubmedSearchArticles/logic.d.ts.map +1 -0
- package/dist/mcp-server/tools/{searchPubMedArticles → pubmedSearchArticles}/logic.js +12 -11
- package/dist/mcp-server/tools/pubmedSearchArticles/logic.js.map +1 -0
- package/dist/mcp-server/tools/pubmedSearchArticles/registration.d.ts +11 -0
- package/dist/mcp-server/tools/pubmedSearchArticles/registration.d.ts.map +1 -0
- package/dist/mcp-server/tools/{searchPubMedArticles → pubmedSearchArticles}/registration.js +13 -12
- package/dist/mcp-server/tools/pubmedSearchArticles/registration.js.map +1 -0
- package/dist/mcp-server/transports/auth/authFactory.d.ts +1 -0
- package/dist/mcp-server/transports/auth/authFactory.d.ts.map +1 -0
- package/dist/mcp-server/transports/auth/authFactory.js +1 -0
- package/dist/mcp-server/transports/auth/authFactory.js.map +1 -0
- package/dist/mcp-server/transports/auth/authMiddleware.d.ts +1 -0
- package/dist/mcp-server/transports/auth/authMiddleware.d.ts.map +1 -0
- package/dist/mcp-server/transports/auth/authMiddleware.js +1 -0
- package/dist/mcp-server/transports/auth/authMiddleware.js.map +1 -0
- package/dist/mcp-server/transports/auth/index.d.ts +2 -1
- package/dist/mcp-server/transports/auth/index.d.ts.map +1 -0
- package/dist/mcp-server/transports/auth/index.js +1 -0
- package/dist/mcp-server/transports/auth/index.js.map +1 -0
- package/dist/mcp-server/transports/auth/lib/authContext.d.ts +1 -0
- package/dist/mcp-server/transports/auth/lib/authContext.d.ts.map +1 -0
- package/dist/mcp-server/transports/auth/lib/authContext.js +1 -0
- package/dist/mcp-server/transports/auth/lib/authContext.js.map +1 -0
- package/dist/mcp-server/transports/auth/lib/authTypes.d.ts +1 -0
- package/dist/mcp-server/transports/auth/lib/authTypes.d.ts.map +1 -0
- package/dist/mcp-server/transports/auth/lib/authTypes.js +1 -0
- package/dist/mcp-server/transports/auth/lib/authTypes.js.map +1 -0
- package/dist/mcp-server/transports/auth/lib/authUtils.d.ts +1 -0
- package/dist/mcp-server/transports/auth/lib/authUtils.d.ts.map +1 -0
- package/dist/mcp-server/transports/auth/lib/authUtils.js +1 -0
- package/dist/mcp-server/transports/auth/lib/authUtils.js.map +1 -0
- package/dist/mcp-server/transports/auth/strategies/authStrategy.d.ts +1 -0
- package/dist/mcp-server/transports/auth/strategies/authStrategy.d.ts.map +1 -0
- package/dist/mcp-server/transports/auth/strategies/authStrategy.js +1 -0
- package/dist/mcp-server/transports/auth/strategies/authStrategy.js.map +1 -0
- package/dist/mcp-server/transports/auth/strategies/jwtStrategy.d.ts +1 -0
- package/dist/mcp-server/transports/auth/strategies/jwtStrategy.d.ts.map +1 -0
- package/dist/mcp-server/transports/auth/strategies/jwtStrategy.js +6 -0
- package/dist/mcp-server/transports/auth/strategies/jwtStrategy.js.map +1 -0
- package/dist/mcp-server/transports/auth/strategies/oauthStrategy.d.ts +1 -0
- package/dist/mcp-server/transports/auth/strategies/oauthStrategy.d.ts.map +1 -0
- package/dist/mcp-server/transports/auth/strategies/oauthStrategy.js +7 -0
- package/dist/mcp-server/transports/auth/strategies/oauthStrategy.js.map +1 -0
- package/dist/mcp-server/transports/core/baseTransportManager.d.ts +1 -0
- package/dist/mcp-server/transports/core/baseTransportManager.d.ts.map +1 -0
- package/dist/mcp-server/transports/core/baseTransportManager.js +2 -0
- package/dist/mcp-server/transports/core/baseTransportManager.js.map +1 -0
- package/dist/mcp-server/transports/core/headerUtils.d.ts +20 -0
- package/dist/mcp-server/transports/core/headerUtils.d.ts.map +1 -0
- package/dist/mcp-server/transports/core/headerUtils.js +38 -0
- package/dist/mcp-server/transports/core/headerUtils.js.map +1 -0
- package/dist/mcp-server/transports/core/honoNodeBridge.d.ts +61 -7
- package/dist/mcp-server/transports/core/honoNodeBridge.d.ts.map +1 -0
- package/dist/mcp-server/transports/core/honoNodeBridge.js +102 -14
- package/dist/mcp-server/transports/core/honoNodeBridge.js.map +1 -0
- package/dist/mcp-server/transports/core/statefulTransportManager.d.ts +54 -8
- package/dist/mcp-server/transports/core/statefulTransportManager.d.ts.map +1 -0
- package/dist/mcp-server/transports/core/statefulTransportManager.js +185 -120
- package/dist/mcp-server/transports/core/statefulTransportManager.js.map +1 -0
- package/dist/mcp-server/transports/core/statelessTransportManager.d.ts +45 -7
- package/dist/mcp-server/transports/core/statelessTransportManager.d.ts.map +1 -0
- package/dist/mcp-server/transports/core/statelessTransportManager.js +85 -24
- package/dist/mcp-server/transports/core/statelessTransportManager.js.map +1 -0
- package/dist/mcp-server/transports/core/transportTypes.d.ts +59 -21
- package/dist/mcp-server/transports/core/transportTypes.d.ts.map +1 -0
- package/dist/mcp-server/transports/core/transportTypes.js +4 -1
- package/dist/mcp-server/transports/core/transportTypes.js.map +1 -0
- package/dist/mcp-server/transports/http/httpErrorHandler.d.ts +1 -0
- package/dist/mcp-server/transports/http/httpErrorHandler.d.ts.map +1 -0
- package/dist/mcp-server/transports/http/httpErrorHandler.js +1 -0
- package/dist/mcp-server/transports/http/httpErrorHandler.js.map +1 -0
- package/dist/mcp-server/transports/http/httpTransport.d.ts +4 -3
- package/dist/mcp-server/transports/http/httpTransport.d.ts.map +1 -0
- package/dist/mcp-server/transports/http/httpTransport.js +52 -16
- package/dist/mcp-server/transports/http/httpTransport.js.map +1 -0
- package/dist/mcp-server/transports/http/httpTypes.d.ts +1 -0
- package/dist/mcp-server/transports/http/httpTypes.d.ts.map +1 -0
- package/dist/mcp-server/transports/http/httpTypes.js +1 -0
- package/dist/mcp-server/transports/http/httpTypes.js.map +1 -0
- package/dist/mcp-server/transports/http/index.d.ts +1 -0
- package/dist/mcp-server/transports/http/index.d.ts.map +1 -0
- package/dist/mcp-server/transports/http/index.js +1 -0
- package/dist/mcp-server/transports/http/index.js.map +1 -0
- package/dist/mcp-server/transports/http/mcpTransportMiddleware.d.ts +4 -2
- package/dist/mcp-server/transports/http/mcpTransportMiddleware.d.ts.map +1 -0
- package/dist/mcp-server/transports/http/mcpTransportMiddleware.js +27 -24
- package/dist/mcp-server/transports/http/mcpTransportMiddleware.js.map +1 -0
- package/dist/mcp-server/transports/stdio/index.d.ts +1 -0
- package/dist/mcp-server/transports/stdio/index.d.ts.map +1 -0
- package/dist/mcp-server/transports/stdio/index.js +1 -0
- package/dist/mcp-server/transports/stdio/index.js.map +1 -0
- package/dist/mcp-server/transports/stdio/stdioTransport.d.ts +1 -0
- package/dist/mcp-server/transports/stdio/stdioTransport.d.ts.map +1 -0
- package/dist/mcp-server/transports/stdio/stdioTransport.js +1 -0
- package/dist/mcp-server/transports/stdio/stdioTransport.js.map +1 -0
- package/dist/services/NCBI/core/ncbiConstants.d.ts +1 -0
- package/dist/services/NCBI/core/ncbiConstants.d.ts.map +1 -0
- package/dist/services/NCBI/core/ncbiConstants.js +1 -0
- package/dist/services/NCBI/core/ncbiConstants.js.map +1 -0
- package/dist/services/NCBI/core/ncbiCoreApiClient.d.ts +1 -0
- package/dist/services/NCBI/core/ncbiCoreApiClient.d.ts.map +1 -0
- package/dist/services/NCBI/core/ncbiCoreApiClient.js +2 -0
- package/dist/services/NCBI/core/ncbiCoreApiClient.js.map +1 -0
- package/dist/services/NCBI/core/ncbiRequestQueueManager.d.ts +1 -1
- package/dist/services/NCBI/core/ncbiRequestQueueManager.d.ts.map +1 -0
- package/dist/services/NCBI/core/ncbiRequestQueueManager.js +5 -8
- package/dist/services/NCBI/core/ncbiRequestQueueManager.js.map +1 -0
- package/dist/services/NCBI/core/ncbiResponseHandler.d.ts +1 -0
- package/dist/services/NCBI/core/ncbiResponseHandler.d.ts.map +1 -0
- package/dist/services/NCBI/core/ncbiResponseHandler.js +3 -1
- package/dist/services/NCBI/core/ncbiResponseHandler.js.map +1 -0
- package/dist/services/NCBI/core/ncbiService.d.ts +1 -0
- package/dist/services/NCBI/core/ncbiService.d.ts.map +1 -0
- package/dist/services/NCBI/core/ncbiService.js +4 -0
- package/dist/services/NCBI/core/ncbiService.js.map +1 -0
- package/dist/services/NCBI/parsing/eSummaryResultParser.d.ts +1 -0
- package/dist/services/NCBI/parsing/eSummaryResultParser.d.ts.map +1 -0
- package/dist/services/NCBI/parsing/eSummaryResultParser.js +2 -0
- package/dist/services/NCBI/parsing/eSummaryResultParser.js.map +1 -0
- package/dist/services/NCBI/parsing/index.d.ts +1 -0
- package/dist/services/NCBI/parsing/index.d.ts.map +1 -0
- package/dist/services/NCBI/parsing/index.js +1 -0
- package/dist/services/NCBI/parsing/index.js.map +1 -0
- package/dist/services/NCBI/parsing/pubmedArticleStructureParser.d.ts +1 -0
- package/dist/services/NCBI/parsing/pubmedArticleStructureParser.d.ts.map +1 -0
- package/dist/services/NCBI/parsing/pubmedArticleStructureParser.js +1 -0
- package/dist/services/NCBI/parsing/pubmedArticleStructureParser.js.map +1 -0
- package/dist/services/NCBI/parsing/xmlGenericHelpers.d.ts +1 -0
- package/dist/services/NCBI/parsing/xmlGenericHelpers.d.ts.map +1 -0
- package/dist/services/NCBI/parsing/xmlGenericHelpers.js +1 -0
- package/dist/services/NCBI/parsing/xmlGenericHelpers.js.map +1 -0
- package/dist/types-global/errors.d.ts +1 -0
- package/dist/types-global/errors.d.ts.map +1 -0
- package/dist/types-global/errors.js +10 -0
- package/dist/types-global/errors.js.map +1 -0
- package/dist/types-global/pubmedXml.d.ts +1 -0
- package/dist/types-global/pubmedXml.d.ts.map +1 -0
- package/dist/types-global/pubmedXml.js +1 -0
- package/dist/types-global/pubmedXml.js.map +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +3 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/internal/errorHandler.d.ts +1 -7
- package/dist/utils/internal/errorHandler.d.ts.map +1 -0
- package/dist/utils/internal/errorHandler.js +28 -6
- package/dist/utils/internal/errorHandler.js.map +1 -0
- package/dist/utils/internal/index.d.ts +2 -0
- package/dist/utils/internal/index.d.ts.map +1 -0
- package/dist/utils/internal/index.js +2 -0
- package/dist/utils/internal/index.js.map +1 -0
- package/dist/utils/internal/logger.d.ts +1 -0
- package/dist/utils/internal/logger.d.ts.map +1 -0
- package/dist/utils/internal/logger.js +14 -8
- package/dist/utils/internal/logger.js.map +1 -0
- package/dist/utils/internal/performance.d.ts +22 -0
- package/dist/utils/internal/performance.d.ts.map +1 -0
- package/dist/utils/internal/performance.js +104 -0
- package/dist/utils/internal/performance.js.map +1 -0
- package/dist/utils/internal/requestContext.d.ts +1 -0
- package/dist/utils/internal/requestContext.d.ts.map +1 -0
- package/dist/utils/internal/requestContext.js +11 -0
- package/dist/utils/internal/requestContext.js.map +1 -0
- package/dist/utils/metrics/index.d.ts +1 -0
- package/dist/utils/metrics/index.d.ts.map +1 -0
- package/dist/utils/metrics/index.js +1 -0
- package/dist/utils/metrics/index.js.map +1 -0
- package/dist/utils/metrics/tokenCounter.d.ts +1 -0
- package/dist/utils/metrics/tokenCounter.d.ts.map +1 -0
- package/dist/utils/metrics/tokenCounter.js +1 -0
- package/dist/utils/metrics/tokenCounter.js.map +1 -0
- package/dist/utils/network/fetchWithTimeout.d.ts +1 -0
- package/dist/utils/network/fetchWithTimeout.d.ts.map +1 -0
- package/dist/utils/network/fetchWithTimeout.js +19 -0
- package/dist/utils/network/fetchWithTimeout.js.map +1 -0
- package/dist/utils/network/index.d.ts +1 -0
- package/dist/utils/network/index.d.ts.map +1 -0
- package/dist/utils/network/index.js +1 -0
- package/dist/utils/network/index.js.map +1 -0
- package/dist/utils/parsing/dateParser.d.ts +3 -3
- package/dist/utils/parsing/dateParser.d.ts.map +1 -0
- package/dist/utils/parsing/dateParser.js +3 -2
- package/dist/utils/parsing/dateParser.js.map +1 -0
- package/dist/utils/parsing/index.d.ts +1 -0
- package/dist/utils/parsing/index.d.ts.map +1 -0
- package/dist/utils/parsing/index.js +1 -0
- package/dist/utils/parsing/index.js.map +1 -0
- package/dist/utils/parsing/jsonParser.d.ts +2 -1
- package/dist/utils/parsing/jsonParser.d.ts.map +1 -0
- package/dist/utils/parsing/jsonParser.js +5 -3
- package/dist/utils/parsing/jsonParser.js.map +1 -0
- package/dist/utils/scheduling/index.d.ts +1 -0
- package/dist/utils/scheduling/index.d.ts.map +1 -0
- package/dist/utils/scheduling/index.js +1 -0
- package/dist/utils/scheduling/index.js.map +1 -0
- package/dist/utils/scheduling/scheduler.d.ts +1 -0
- package/dist/utils/scheduling/scheduler.d.ts.map +1 -0
- package/dist/utils/scheduling/scheduler.js +3 -1
- package/dist/utils/scheduling/scheduler.js.map +1 -0
- package/dist/utils/security/idGenerator.d.ts +1 -0
- package/dist/utils/security/idGenerator.d.ts.map +1 -0
- package/dist/utils/security/idGenerator.js +32 -27
- package/dist/utils/security/idGenerator.js.map +1 -0
- package/dist/utils/security/index.d.ts +1 -0
- package/dist/utils/security/index.d.ts.map +1 -0
- package/dist/utils/security/index.js +1 -0
- package/dist/utils/security/index.js.map +1 -0
- package/dist/utils/security/rateLimiter.d.ts +1 -0
- package/dist/utils/security/rateLimiter.d.ts.map +1 -0
- package/dist/utils/security/rateLimiter.js +45 -22
- package/dist/utils/security/rateLimiter.js.map +1 -0
- package/dist/utils/security/sanitization.d.ts +1 -0
- package/dist/utils/security/sanitization.d.ts.map +1 -0
- package/dist/utils/security/sanitization.js +65 -63
- package/dist/utils/security/sanitization.js.map +1 -0
- package/dist/utils/telemetry/instrumentation.d.ts +8 -0
- package/dist/utils/telemetry/instrumentation.d.ts.map +1 -0
- package/dist/utils/telemetry/instrumentation.js +179 -0
- package/dist/utils/telemetry/instrumentation.js.map +1 -0
- package/dist/utils/telemetry/semconv.d.ts +16 -0
- package/dist/utils/telemetry/semconv.d.ts.map +1 -0
- package/dist/utils/telemetry/semconv.js +16 -0
- package/dist/utils/telemetry/semconv.js.map +1 -0
- package/package.json +31 -14
- package/dist/mcp-server/tools/fetchPubMedContent/index.d.ts +0 -6
- package/dist/mcp-server/tools/fetchPubMedContent/index.js +0 -6
- package/dist/mcp-server/tools/fetchPubMedContent/registration.d.ts +0 -10
- package/dist/mcp-server/tools/generatePubMedChart/registration.d.ts +0 -7
- package/dist/mcp-server/tools/getPubMedArticleConnections/index.d.ts +0 -6
- package/dist/mcp-server/tools/getPubMedArticleConnections/index.js +0 -6
- package/dist/mcp-server/tools/getPubMedArticleConnections/logic/citationFormatter.d.ts +0 -9
- package/dist/mcp-server/tools/getPubMedArticleConnections/logic/elinkHandler.d.ts +0 -9
- package/dist/mcp-server/tools/getPubMedArticleConnections/logic/types.js +0 -5
- package/dist/mcp-server/tools/getPubMedArticleConnections/registration.d.ts +0 -11
- package/dist/mcp-server/tools/searchPubMedArticles/index.d.ts +0 -6
- package/dist/mcp-server/tools/searchPubMedArticles/index.js +0 -6
- package/dist/mcp-server/tools/searchPubMedArticles/registration.d.ts +0 -10
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @fileoverview Main logic handler for the '
|
|
2
|
+
* @fileoverview Main logic handler for the 'pubmed_article_connections' MCP tool.
|
|
3
3
|
* Orchestrates calls to ELink or citation formatting handlers.
|
|
4
|
-
* @module src/mcp-server/tools/
|
|
4
|
+
* @module src/mcp-server/tools/pubmedArticleConnections/logic/index
|
|
5
5
|
*/
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
import { RequestContext } from "../../../../utils/index.js";
|
|
8
8
|
import type { ToolOutputData } from "./types.js";
|
|
9
9
|
/**
|
|
10
|
-
* Zod schema for the input parameters of the '
|
|
10
|
+
* Zod schema for the input parameters of the 'pubmed_article_connections' tool.
|
|
11
11
|
*/
|
|
12
|
-
export declare const
|
|
12
|
+
export declare const PubMedArticleConnectionsInputSchema: z.ZodObject<{
|
|
13
13
|
sourcePmid: z.ZodString;
|
|
14
14
|
relationshipType: z.ZodDefault<z.ZodEnum<["pubmed_similar_articles", "pubmed_citedin", "pubmed_references", "citation_formats"]>>;
|
|
15
15
|
maxRelatedResults: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
@@ -26,13 +26,14 @@ export declare const GetPubMedArticleConnectionsInputSchema: z.ZodObject<{
|
|
|
26
26
|
citationStyles?: ("ris" | "bibtex" | "apa_string" | "mla_string")[] | undefined;
|
|
27
27
|
}>;
|
|
28
28
|
/**
|
|
29
|
-
* Type alias for the validated input of the '
|
|
29
|
+
* Type alias for the validated input of the 'pubmed_article_connections' tool.
|
|
30
30
|
*/
|
|
31
|
-
export type
|
|
31
|
+
export type PubMedArticleConnectionsInput = z.infer<typeof PubMedArticleConnectionsInputSchema>;
|
|
32
32
|
/**
|
|
33
|
-
* Main handler for the '
|
|
34
|
-
* @param {
|
|
33
|
+
* Main handler for the 'pubmed_article_connections' tool.
|
|
34
|
+
* @param {PubMedArticleConnectionsInput} input - Validated input parameters.
|
|
35
35
|
* @param {RequestContext} context - The request context for this tool invocation.
|
|
36
36
|
* @returns {Promise<ToolOutputData>} The result of the tool call.
|
|
37
37
|
*/
|
|
38
|
-
export declare function
|
|
38
|
+
export declare function handlePubMedArticleConnections(input: PubMedArticleConnectionsInput, context: RequestContext): Promise<ToolOutputData>;
|
|
39
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/mcp-server/tools/pubmedArticleConnections/logic/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAEL,cAAc,EAGf,MAAM,4BAA4B,CAAC;AAGpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD;;GAEG;AACH,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;EAmC9C,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CACjD,OAAO,mCAAmC,CAC3C,CAAC;AAEF;;;;;GAKG;AACH,wBAAsB,8BAA8B,CAClD,KAAK,EAAE,6BAA6B,EACpC,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,cAAc,CAAC,CAsDzB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @fileoverview Main logic handler for the '
|
|
2
|
+
* @fileoverview Main logic handler for the 'pubmed_article_connections' MCP tool.
|
|
3
3
|
* Orchestrates calls to ELink or citation formatting handlers.
|
|
4
|
-
* @module src/mcp-server/tools/
|
|
4
|
+
* @module src/mcp-server/tools/pubmedArticleConnections/logic/index
|
|
5
5
|
*/
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
import { BaseErrorCode, McpError } from "../../../../types-global/errors.js";
|
|
@@ -9,9 +9,9 @@ import { logger, requestContextService, sanitizeInputForLogging, } from "../../.
|
|
|
9
9
|
import { handleCitationFormats } from "./citationFormatter.js";
|
|
10
10
|
import { handleELinkRelationships } from "./elinkHandler.js";
|
|
11
11
|
/**
|
|
12
|
-
* Zod schema for the input parameters of the '
|
|
12
|
+
* Zod schema for the input parameters of the 'pubmed_article_connections' tool.
|
|
13
13
|
*/
|
|
14
|
-
export const
|
|
14
|
+
export const PubMedArticleConnectionsInputSchema = z.object({
|
|
15
15
|
sourcePmid: z
|
|
16
16
|
.string()
|
|
17
17
|
.regex(/^\d+$/)
|
|
@@ -24,7 +24,7 @@ export const GetPubMedArticleConnectionsInputSchema = z.object({
|
|
|
24
24
|
"citation_formats",
|
|
25
25
|
])
|
|
26
26
|
.default("pubmed_similar_articles")
|
|
27
|
-
.describe("Specifies the type of connection or action:
|
|
27
|
+
.describe("Specifies the type of connection or action: 'pubmed_similar_articles' (finds similar articles), 'pubmed_citedin' (finds citing articles), 'pubmed_references' (finds referenced articles), or 'citation_formats' (retrieves formatted citations)."),
|
|
28
28
|
maxRelatedResults: z
|
|
29
29
|
.number()
|
|
30
30
|
.int()
|
|
@@ -32,27 +32,27 @@ export const GetPubMedArticleConnectionsInputSchema = z.object({
|
|
|
32
32
|
.max(50, "Maximum 50 related results can be requested.")
|
|
33
33
|
.optional()
|
|
34
34
|
.default(5)
|
|
35
|
-
.describe("Maximum number of related articles to retrieve
|
|
35
|
+
.describe("Maximum number of related articles to retrieve for relationship-based searches. Default is 5, max is 50."),
|
|
36
36
|
citationStyles: z
|
|
37
37
|
.array(z.enum(["ris", "bibtex", "apa_string", "mla_string"]))
|
|
38
38
|
.optional()
|
|
39
39
|
.default(["ris"])
|
|
40
|
-
.describe("An array of citation styles to format the source article into when 'relationshipType' is 'citation_formats'. Supported styles: 'ris', 'bibtex', 'apa_string', 'mla_string'. Default is ['ris'].
|
|
40
|
+
.describe("An array of citation styles to format the source article into when 'relationshipType' is 'citation_formats'. Supported styles: 'ris', 'bibtex', 'apa_string', 'mla_string'. Default is ['ris']."),
|
|
41
41
|
});
|
|
42
42
|
/**
|
|
43
|
-
* Main handler for the '
|
|
44
|
-
* @param {
|
|
43
|
+
* Main handler for the 'pubmed_article_connections' tool.
|
|
44
|
+
* @param {PubMedArticleConnectionsInput} input - Validated input parameters.
|
|
45
45
|
* @param {RequestContext} context - The request context for this tool invocation.
|
|
46
46
|
* @returns {Promise<ToolOutputData>} The result of the tool call.
|
|
47
47
|
*/
|
|
48
|
-
export async function
|
|
48
|
+
export async function handlePubMedArticleConnections(input, context) {
|
|
49
49
|
const toolLogicContext = requestContextService.createRequestContext({
|
|
50
50
|
parentRequestId: context.requestId,
|
|
51
|
-
operation: "
|
|
52
|
-
toolName: "
|
|
51
|
+
operation: "handlePubMedArticleConnections",
|
|
52
|
+
toolName: "pubmed_article_connections",
|
|
53
53
|
input: sanitizeInputForLogging(input),
|
|
54
54
|
});
|
|
55
|
-
logger.info("Executing
|
|
55
|
+
logger.info("Executing pubmed_article_connections tool", toolLogicContext);
|
|
56
56
|
const outputData = {
|
|
57
57
|
sourcePmid: input.sourcePmid,
|
|
58
58
|
relationshipType: input.relationshipType,
|
|
@@ -80,7 +80,7 @@ export async function handleGetPubMedArticleConnections(input, context) {
|
|
|
80
80
|
Object.keys(outputData.citations).length === 0)) {
|
|
81
81
|
outputData.message = "No results found for the given parameters.";
|
|
82
82
|
}
|
|
83
|
-
logger.notice("Successfully executed
|
|
83
|
+
logger.notice("Successfully executed pubmed_article_connections tool.", {
|
|
84
84
|
...toolLogicContext,
|
|
85
85
|
relationshipType: input.relationshipType,
|
|
86
86
|
retrievedCount: outputData.retrievedCount,
|
|
@@ -88,3 +88,4 @@ export async function handleGetPubMedArticleConnections(input, context) {
|
|
|
88
88
|
});
|
|
89
89
|
return outputData;
|
|
90
90
|
}
|
|
91
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/mcp-server/tools/pubmedArticleConnections/logic/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EACL,MAAM,EAEN,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAG7D;;GAEG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1D,UAAU,EAAE,CAAC;SACV,MAAM,EAAE;SACR,KAAK,CAAC,OAAO,CAAC;SACd,QAAQ,CACP,uJAAuJ,CACxJ;IACH,gBAAgB,EAAE,CAAC;SAChB,IAAI,CAAC;QACJ,yBAAyB;QACzB,gBAAgB;QAChB,mBAAmB;QACnB,kBAAkB;KACnB,CAAC;SACD,OAAO,CAAC,yBAAyB,CAAC;SAClC,QAAQ,CACP,mPAAmP,CACpP;IACH,iBAAiB,EAAE,CAAC;SACjB,MAAM,EAAE;SACR,GAAG,EAAE;SACL,QAAQ,EAAE;SACV,GAAG,CAAC,EAAE,EAAE,8CAA8C,CAAC;SACvD,QAAQ,EAAE;SACV,OAAO,CAAC,CAAC,CAAC;SACV,QAAQ,CACP,0GAA0G,CAC3G;IACH,cAAc,EAAE,CAAC;SACd,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC;SAC5D,QAAQ,EAAE;SACV,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC;SAChB,QAAQ,CACP,iMAAiM,CAClM;CAC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AAM,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,EACjD,CAAC;QACD,UAAU,CAAC,OAAO,GAAG,4CAA4C,CAAC;IACpE,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,wDAAwD,EAAE;QACtE,GAAG,gBAAgB;QACnB,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;QACxC,cAAc,EAAE,UAAU,CAAC,cAAc;QACzC,kBAAkB,EAAE,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,MAAM;KAC7D,CAAC,CAAC;IAEH,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @fileoverview Shared type definitions for the
|
|
3
|
-
* @module src/mcp-server/tools/
|
|
2
|
+
* @fileoverview Shared type definitions for the pubmedArticleConnections tool logic.
|
|
3
|
+
* @module src/mcp-server/tools/pubmedArticleConnections/logic/types
|
|
4
4
|
*/
|
|
5
|
-
import type {
|
|
5
|
+
import type { PubMedArticleConnectionsInput } from "./index.js";
|
|
6
6
|
export interface RelatedArticle {
|
|
7
7
|
pmid: string;
|
|
8
8
|
title?: string;
|
|
@@ -18,10 +18,11 @@ export interface CitationOutput {
|
|
|
18
18
|
}
|
|
19
19
|
export interface ToolOutputData {
|
|
20
20
|
sourcePmid: string;
|
|
21
|
-
relationshipType:
|
|
21
|
+
relationshipType: PubMedArticleConnectionsInput["relationshipType"];
|
|
22
22
|
relatedArticles: RelatedArticle[];
|
|
23
23
|
citations: CitationOutput;
|
|
24
24
|
retrievedCount: number;
|
|
25
25
|
eUtilityUrl?: string;
|
|
26
26
|
message?: string;
|
|
27
27
|
}
|
|
28
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/mcp-server/tools/pubmedArticleConnections/logic/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAGhE,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,6BAA6B,CAAC,kBAAkB,CAAC,CAAC;IACpE,eAAe,EAAE,cAAc,EAAE,CAAC;IAClC,SAAS,EAAE,cAAc,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/mcp-server/tools/pubmedArticleConnections/logic/types.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Registers the 'pubmed_article_connections' tool with the MCP server.
|
|
3
|
+
* This tool finds articles related to a source PMID or retrieves citation formats.
|
|
4
|
+
* @module src/mcp-server/tools/pubmedArticleConnections/registration
|
|
5
|
+
*/
|
|
6
|
+
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
7
|
+
/**
|
|
8
|
+
* Registers the 'pubmed_article_connections' tool with the given MCP server instance.
|
|
9
|
+
* @param {McpServer} server - The MCP server instance.
|
|
10
|
+
*/
|
|
11
|
+
export declare function registerPubMedArticleConnectionsTool(server: McpServer): Promise<void>;
|
|
12
|
+
//# sourceMappingURL=registration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registration.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/pubmedArticleConnections/registration.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAezE;;;GAGG;AACH,wBAAsB,oCAAoC,CACxD,MAAM,EAAE,SAAS,GAChB,OAAO,CAAC,IAAI,CAAC,CAmFf"}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @fileoverview Registers the '
|
|
2
|
+
* @fileoverview Registers the 'pubmed_article_connections' tool with the MCP server.
|
|
3
3
|
* This tool finds articles related to a source PMID or retrieves citation formats.
|
|
4
|
-
* @module src/mcp-server/tools/
|
|
4
|
+
* @module src/mcp-server/tools/pubmedArticleConnections/registration
|
|
5
5
|
*/
|
|
6
6
|
import { BaseErrorCode, McpError } from "../../../types-global/errors.js";
|
|
7
7
|
import { ErrorHandler, logger, requestContextService, } from "../../../utils/index.js";
|
|
8
|
-
import {
|
|
8
|
+
import { PubMedArticleConnectionsInputSchema, handlePubMedArticleConnections, } from "./logic/index.js";
|
|
9
9
|
/**
|
|
10
|
-
* Registers the '
|
|
10
|
+
* Registers the 'pubmed_article_connections' tool with the given MCP server instance.
|
|
11
11
|
* @param {McpServer} server - The MCP server instance.
|
|
12
12
|
*/
|
|
13
|
-
export async function
|
|
14
|
-
const operation = "
|
|
15
|
-
const toolName = "
|
|
13
|
+
export async function registerPubMedArticleConnectionsTool(server) {
|
|
14
|
+
const operation = "registerPubMedArticleConnectionsTool";
|
|
15
|
+
const toolName = "pubmed_article_connections";
|
|
16
16
|
const toolDescription = "Finds articles related to a source PubMed ID (PMID) or retrieves formatted citations for it. Supports finding similar articles, articles that cite the source, articles referenced by the source (via NCBI ELink), or fetching data to generate citations in various styles (RIS, BibTeX, APA, MLA via NCBI EFetch and server-side formatting). Returns a JSON object detailing the connections or formatted citations.";
|
|
17
17
|
const context = requestContextService.createRequestContext({ operation });
|
|
18
18
|
await ErrorHandler.tryCatch(async () => {
|
|
19
|
-
server.tool(toolName, toolDescription,
|
|
19
|
+
server.tool(toolName, toolDescription, PubMedArticleConnectionsInputSchema.shape, async (input, mcpProvidedContext) => {
|
|
20
20
|
const richContext = requestContextService.createRequestContext({
|
|
21
21
|
parentRequestId: context.requestId,
|
|
22
|
-
operation: "
|
|
22
|
+
operation: "pubMedArticleConnectionsToolHandler",
|
|
23
23
|
mcpToolContext: mcpProvidedContext,
|
|
24
24
|
input,
|
|
25
25
|
});
|
|
26
26
|
try {
|
|
27
|
-
const result = await
|
|
27
|
+
const result = await handlePubMedArticleConnections(input, richContext);
|
|
28
28
|
return {
|
|
29
29
|
content: [
|
|
30
30
|
{ type: "text", text: JSON.stringify(result, null, 2) },
|
|
@@ -34,7 +34,7 @@ export async function registerGetPubMedArticleConnectionsTool(server) {
|
|
|
34
34
|
}
|
|
35
35
|
catch (error) {
|
|
36
36
|
const handledError = ErrorHandler.handleError(error, {
|
|
37
|
-
operation: "
|
|
37
|
+
operation: "pubMedArticleConnectionsToolHandler",
|
|
38
38
|
context: richContext,
|
|
39
39
|
input,
|
|
40
40
|
rethrow: false,
|
|
@@ -70,3 +70,4 @@ export async function registerGetPubMedArticleConnectionsTool(server) {
|
|
|
70
70
|
critical: true,
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
|
+
//# sourceMappingURL=registration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registration.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/pubmedArticleConnections/registration.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO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ACf,CAAC,CAAC;gBAEH,MAAM,QAAQ,GACZ,YAAY,YAAY,QAAQ;oBAC9B,CAAC,CAAC,YAAY;oBACd,CAAC,CAAC,IAAI,QAAQ,CACV,aAAa,CAAC,cAAc,EAC5B,wEAAwE,EACxE;wBACE,iBAAiB,EAAE,YAAY,CAAC,IAAI;wBACpC,oBAAoB,EAAE,YAAY,CAAC,OAAO;qBAC3C,CACF,CAAC;gBAER,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAM;4BACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;gCACnB,KAAK,EAAE;oCACL,IAAI,EAAE,QAAQ,CAAC,IAAI;oCACnB,OAAO,EAAE,QAAQ,CAAC,OAAO;oCACzB,OAAO,EAAE,QAAQ,CAAC,OAAO;iCAC1B;6BACF,CAAC;yBACH;qBACF;oBACD,OAAO,EAAE,IAAI;iBACd,CAAC;YACJ,CAAC;QACH,CAAC,CACF,CAAC;QACF,MAAM,CAAC,MAAM,CAAC,SAAS,QAAQ,eAAe,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC,EACD;QACE,SAAS;QACT,OAAO;QACP,SAAS,EAAE,aAAa,CAAC,qBAAqB;QAC9C,QAAQ,EAAE,IAAI;KACf,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Barrel file for the pubmed_fetch_contents tool.
|
|
3
|
+
* Exports the tool's registration function.
|
|
4
|
+
* @module src/mcp-server/tools/pubmedFetchContents/index
|
|
5
|
+
*/
|
|
6
|
+
export { registerPubMedFetchContentsTool } from "./registration.js";
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/pubmedFetchContents/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,+BAA+B,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Barrel file for the pubmed_fetch_contents tool.
|
|
3
|
+
* Exports the tool's registration function.
|
|
4
|
+
* @module src/mcp-server/tools/pubmedFetchContents/index
|
|
5
|
+
*/
|
|
6
|
+
export { registerPubMedFetchContentsTool } from "./registration.js";
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/pubmedFetchContents/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,+BAA+B,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @fileoverview Logic for the
|
|
2
|
+
* @fileoverview Logic for the pubmed_fetch_contents MCP tool.
|
|
3
3
|
* Handles EFetch queries for specific PMIDs and formats the results.
|
|
4
4
|
* This tool can fetch various details from PubMed including abstracts, full XML,
|
|
5
5
|
* MEDLINE text, and citation data.
|
|
6
|
-
* @module src/mcp-server/tools/
|
|
6
|
+
* @module src/mcp-server/tools/pubmedFetchContents/logic
|
|
7
7
|
*/
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
import { RequestContext } from "../../../utils/index.js";
|
|
10
|
-
export declare const
|
|
10
|
+
export declare const PubMedFetchContentsInputSchema: z.ZodEffects<z.ZodObject<{
|
|
11
11
|
pmids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
12
12
|
queryKey: z.ZodOptional<z.ZodString>;
|
|
13
13
|
webEnv: z.ZodOptional<z.ZodString>;
|
|
@@ -58,10 +58,11 @@ export declare const FetchPubMedContentInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
58
58
|
includeGrantInfo?: boolean | undefined;
|
|
59
59
|
outputFormat?: "json" | "raw_text" | undefined;
|
|
60
60
|
}>;
|
|
61
|
-
export type
|
|
62
|
-
export type
|
|
61
|
+
export type PubMedFetchContentsInput = z.infer<typeof PubMedFetchContentsInputSchema>;
|
|
62
|
+
export type PubMedFetchContentsOutput = {
|
|
63
63
|
content: string;
|
|
64
64
|
articlesReturned: number;
|
|
65
65
|
eFetchUrl: string;
|
|
66
66
|
};
|
|
67
|
-
export declare function
|
|
67
|
+
export declare function pubMedFetchContentsLogic(input: PubMedFetchContentsInput, parentRequestContext: RequestContext): Promise<PubMedFetchContentsOutput>;
|
|
68
|
+
//# sourceMappingURL=logic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logic.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/pubmedFetchContents/logic.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,OAAO,EAEL,cAAc,EAGf,MAAM,yBAAyB,CAAC;AAgBjC,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8GvC,CAAC;AAEL,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAC5C,OAAO,8BAA8B,CACtC,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA8GF,wBAAsB,wBAAwB,CAC5C,KAAK,EAAE,wBAAwB,EAC/B,oBAAoB,EAAE,cAAc,GACnC,OAAO,CAAC,yBAAyB,CAAC,CAwKpC"}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @fileoverview Logic for the
|
|
2
|
+
* @fileoverview Logic for the pubmed_fetch_contents MCP tool.
|
|
3
3
|
* Handles EFetch queries for specific PMIDs and formats the results.
|
|
4
4
|
* This tool can fetch various details from PubMed including abstracts, full XML,
|
|
5
5
|
* MEDLINE text, and citation data.
|
|
6
|
-
* @module src/mcp-server/tools/
|
|
6
|
+
* @module src/mcp-server/tools/pubmedFetchContents/logic
|
|
7
7
|
*/
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
import { getNcbiService } from "../../../services/NCBI/core/ncbiService.js";
|
|
10
10
|
import { BaseErrorCode, McpError } from "../../../types-global/errors.js";
|
|
11
11
|
import { logger, requestContextService, sanitizeInputForLogging, } from "../../../utils/index.js";
|
|
12
12
|
import { ensureArray, extractAbstractText, extractArticleDates, extractAuthors, extractDoi, extractGrants, extractJournalInfo, extractKeywords, extractMeshTerms, extractPmid, extractPublicationTypes, getText, } from "../../../services/NCBI/parsing/index.js";
|
|
13
|
-
export const
|
|
13
|
+
export const PubMedFetchContentsInputSchema = z
|
|
14
14
|
.object({
|
|
15
15
|
pmids: z
|
|
16
16
|
.array(z.string().regex(/^\d+$/))
|
|
17
17
|
.max(200, "Max 200 PMIDs per call if not using history.")
|
|
18
18
|
.optional()
|
|
19
|
-
.describe("An array of PubMed Unique Identifiers (PMIDs)
|
|
19
|
+
.describe("An array of PubMed Unique Identifiers (PMIDs) to fetch. Use this OR queryKey/webEnv."),
|
|
20
20
|
queryKey: z
|
|
21
21
|
.string()
|
|
22
22
|
.optional()
|
|
23
|
-
.describe("Query key from ESearch history
|
|
23
|
+
.describe("Query key from ESearch history. Requires webEnv. Use this OR pmids."),
|
|
24
24
|
webEnv: z
|
|
25
25
|
.string()
|
|
26
26
|
.optional()
|
|
27
|
-
.describe("Web environment from ESearch history
|
|
27
|
+
.describe("Web environment from ESearch history. Requires queryKey. Use this OR pmids."),
|
|
28
28
|
retstart: z
|
|
29
29
|
.number()
|
|
30
30
|
.int()
|
|
31
31
|
.min(0)
|
|
32
32
|
.optional()
|
|
33
|
-
.describe("
|
|
33
|
+
.describe("0-based index of the first record to retrieve. Used with queryKey/webEnv."),
|
|
34
34
|
retmax: z
|
|
35
35
|
.number()
|
|
36
36
|
.int()
|
|
@@ -41,22 +41,22 @@ export const FetchPubMedContentInputSchema = z
|
|
|
41
41
|
.enum(["abstract_plus", "full_xml", "medline_text", "citation_data"])
|
|
42
42
|
.optional()
|
|
43
43
|
.default("abstract_plus")
|
|
44
|
-
.describe("Specifies the level of detail for the fetched content. Options: 'abstract_plus' (parsed details
|
|
44
|
+
.describe("Specifies the level of detail for the fetched content. Options: 'abstract_plus' (parsed details), 'full_xml' (raw PubMedArticle XML), 'medline_text' (MEDLINE format), 'citation_data' (minimal citation data). Defaults to 'abstract_plus'."),
|
|
45
45
|
includeMeshTerms: z
|
|
46
46
|
.boolean()
|
|
47
47
|
.optional()
|
|
48
48
|
.default(true)
|
|
49
|
-
.describe("
|
|
49
|
+
.describe("Include MeSH terms in 'abstract_plus' and 'citation_data' results. Default: true."),
|
|
50
50
|
includeGrantInfo: z
|
|
51
51
|
.boolean()
|
|
52
52
|
.optional()
|
|
53
53
|
.default(false)
|
|
54
|
-
.describe("
|
|
54
|
+
.describe("Include grant info in 'abstract_plus' results. Default: false."),
|
|
55
55
|
outputFormat: z
|
|
56
56
|
.enum(["json", "raw_text"])
|
|
57
57
|
.optional()
|
|
58
58
|
.default("json")
|
|
59
|
-
.describe("
|
|
59
|
+
.describe("Output format. 'json' (default) wraps data in a JSON object. 'raw_text' returns raw text for 'medline_text' or 'full_xml' detail levels."),
|
|
60
60
|
})
|
|
61
61
|
.superRefine((data, ctx) => {
|
|
62
62
|
if (data.queryKey && !data.webEnv) {
|
|
@@ -168,22 +168,20 @@ function parsePubMedArticleSet(xmlData, input, parentContext) {
|
|
|
168
168
|
}
|
|
169
169
|
return articles;
|
|
170
170
|
}
|
|
171
|
-
export async function
|
|
171
|
+
export async function pubMedFetchContentsLogic(input, parentRequestContext) {
|
|
172
172
|
const toolLogicContext = requestContextService.createRequestContext({
|
|
173
173
|
parentRequestId: parentRequestContext.requestId,
|
|
174
|
-
operation: "
|
|
174
|
+
operation: "pubMedFetchContentsLogic",
|
|
175
175
|
input: sanitizeInputForLogging(input),
|
|
176
176
|
});
|
|
177
|
-
const validationResult =
|
|
177
|
+
const validationResult = PubMedFetchContentsInputSchema.safeParse(input);
|
|
178
178
|
if (!validationResult.success) {
|
|
179
179
|
throw new McpError(BaseErrorCode.VALIDATION_ERROR, validationResult.error.errors[0]?.message || "Invalid input", { ...toolLogicContext, details: validationResult.error.flatten() });
|
|
180
180
|
}
|
|
181
181
|
const ncbiService = getNcbiService();
|
|
182
|
-
logger.info("Executing
|
|
182
|
+
logger.info("Executing pubmed_fetch_contents tool", toolLogicContext);
|
|
183
183
|
const eFetchParams = { db: "pubmed" };
|
|
184
|
-
let usingHistory = false;
|
|
185
184
|
if (input.queryKey && input.webEnv) {
|
|
186
|
-
usingHistory = true;
|
|
187
185
|
eFetchParams.query_key = input.queryKey;
|
|
188
186
|
eFetchParams.WebEnv = input.webEnv;
|
|
189
187
|
if (input.retstart !== undefined)
|
|
@@ -225,7 +223,9 @@ export async function fetchPubMedContentLogic(input, parentRequestContext) {
|
|
|
225
223
|
const pmidRegex = /^PMID- (\d+)/gm;
|
|
226
224
|
let match;
|
|
227
225
|
while ((match = pmidRegex.exec(medlineText)) !== null) {
|
|
228
|
-
|
|
226
|
+
if (match[1]) {
|
|
227
|
+
foundPmidsInMedline.add(match[1]);
|
|
228
|
+
}
|
|
229
229
|
}
|
|
230
230
|
articlesCount = foundPmidsInMedline.size;
|
|
231
231
|
if (input.outputFormat === "raw_text") {
|
|
@@ -299,7 +299,7 @@ export async function fetchPubMedContentLogic(input, parentRequestContext) {
|
|
|
299
299
|
eFetchDetails: { urls: [eFetchUrl] },
|
|
300
300
|
});
|
|
301
301
|
}
|
|
302
|
-
logger.notice("Successfully executed
|
|
302
|
+
logger.notice("Successfully executed pubmed_fetch_contents tool.", {
|
|
303
303
|
...toolLogicContext,
|
|
304
304
|
articlesReturned: articlesCount,
|
|
305
305
|
});
|
|
@@ -309,3 +309,4 @@ export async function fetchPubMedContentLogic(input, parentRequestContext) {
|
|
|
309
309
|
eFetchUrl,
|
|
310
310
|
};
|
|
311
311
|
}
|
|
312
|
+
//# sourceMappingURL=logic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logic.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/pubmedFetchContents/logic.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAM1E,OAAO,EACL,MAAM,EAEN,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,WAAW,EACX,mBAAmB,EACnB,mBAAmB,EACnB,cAAc,EACd,UAAU,EACV,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,uBAAuB,EACvB,OAAO,GACR,MAAM,yCAAyC,CAAC;AAEjD,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC;KAC5C,MAAM,CAAC;IACN,KAAK,EAAE,CAAC;SACL,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;SAChC,GAAG,CAAC,GAAG,EAAE,8CAA8C,CAAC;SACxD,QAAQ,EAAE;SACV,QAAQ,CACP,sFAAsF,CACvF;IACH,QAAQ,EAAE,CAAC;SACR,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,qEAAqE,CACtE;IACH,MAAM,EAAE,CAAC;SACN,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,6EAA6E,CAC9E;IACH,QAAQ,EAAE,CAAC;SACR,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,EAAE;SACV,QAAQ,CACP,2EAA2E,CAC5E;IACH,M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E,IAAI,EAAE,CAAC,SAAS,CAAC,EAAE;SACrC,CAAC,CAAC;IACL,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,mDAAmD,EAAE;QACjE,GAAG,gBAAgB;QACnB,gBAAgB,EAAE,aAAa;KAChC,CAAC,CAAC;IAEH,OAAO;QACL,OAAO,EAAE,eAAe;QACxB,gBAAgB,EAAE,aAAa;QAC/B,SAAS;KACV,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Registration for the pubmed_fetch_contents MCP tool.
|
|
3
|
+
* @module src/mcp-server/tools/pubmedFetchContents/registration
|
|
4
|
+
*/
|
|
5
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
6
|
+
/**
|
|
7
|
+
* Registers the pubmed_fetch_contents tool with the MCP server.
|
|
8
|
+
* @param server - The McpServer instance.
|
|
9
|
+
*/
|
|
10
|
+
export declare function registerPubMedFetchContentsTool(server: McpServer): Promise<void>;
|
|
11
|
+
//# sourceMappingURL=registration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registration.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/pubmedFetchContents/registration.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAepE;;;GAGG;AACH,wBAAsB,+BAA+B,CACnD,MAAM,EAAE,SAAS,GAChB,OAAO,CAAC,IAAI,CAAC,CAgFf"}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @fileoverview Registration for the
|
|
3
|
-
* @module src/mcp-server/tools/
|
|
2
|
+
* @fileoverview Registration for the pubmed_fetch_contents MCP tool.
|
|
3
|
+
* @module src/mcp-server/tools/pubmedFetchContents/registration
|
|
4
4
|
*/
|
|
5
5
|
import { BaseErrorCode, McpError } from "../../../types-global/errors.js";
|
|
6
6
|
import { ErrorHandler, logger, requestContextService, } from "../../../utils/index.js";
|
|
7
|
-
import {
|
|
7
|
+
import { PubMedFetchContentsInputSchema, pubMedFetchContentsLogic, } from "./logic.js";
|
|
8
8
|
/**
|
|
9
|
-
* Registers the
|
|
9
|
+
* Registers the pubmed_fetch_contents tool with the MCP server.
|
|
10
10
|
* @param server - The McpServer instance.
|
|
11
11
|
*/
|
|
12
|
-
export async function
|
|
13
|
-
const operation = "
|
|
14
|
-
const toolName = "
|
|
15
|
-
const toolDescription = "Fetches detailed information from PubMed using NCBI EFetch. Can be used with a direct list of PMIDs or with queryKey/webEnv from an ESearch history entry. Supports pagination (retstart, retmax) when using history. Available 'detailLevel' options: 'abstract_plus' (parsed
|
|
12
|
+
export async function registerPubMedFetchContentsTool(server) {
|
|
13
|
+
const operation = "registerPubMedFetchContentsTool";
|
|
14
|
+
const toolName = "pubmed_fetch_contents";
|
|
15
|
+
const toolDescription = "Fetches detailed information from PubMed using NCBI EFetch. Can be used with a direct list of PMIDs or with queryKey/webEnv from an ESearch history entry. Supports pagination (retstart, retmax) when using history. Available 'detailLevel' options: 'abstract_plus' (parsed details), 'full_xml' (raw PubMedArticle XML), 'medline_text' (MEDLINE format), or 'citation_data' (minimal citation data). Returns a JSON object containing results, any PMIDs not found (if applicable), and EFetch details.";
|
|
16
16
|
const context = requestContextService.createRequestContext({ operation });
|
|
17
17
|
await ErrorHandler.tryCatch(async () => {
|
|
18
|
-
server.tool(toolName, toolDescription,
|
|
18
|
+
server.tool(toolName, toolDescription, PubMedFetchContentsInputSchema._def.schema.shape, async (input, toolContext) => {
|
|
19
19
|
const richContext = requestContextService.createRequestContext({
|
|
20
20
|
parentRequestId: context.requestId,
|
|
21
|
-
operation: "
|
|
21
|
+
operation: "pubMedFetchContentsToolHandler",
|
|
22
22
|
mcpToolContext: toolContext,
|
|
23
23
|
input,
|
|
24
24
|
});
|
|
25
25
|
try {
|
|
26
|
-
const result = await
|
|
26
|
+
const result = await pubMedFetchContentsLogic(input, richContext);
|
|
27
27
|
return {
|
|
28
28
|
content: [{ type: "text", text: result.content }],
|
|
29
29
|
isError: false,
|
|
@@ -31,7 +31,7 @@ export async function registerFetchPubMedContentTool(server) {
|
|
|
31
31
|
}
|
|
32
32
|
catch (error) {
|
|
33
33
|
const handledError = ErrorHandler.handleError(error, {
|
|
34
|
-
operation: "
|
|
34
|
+
operation: "pubMedFetchContentsToolHandler",
|
|
35
35
|
context: richContext,
|
|
36
36
|
input,
|
|
37
37
|
rethrow: false,
|
|
@@ -67,3 +67,4 @@ export async function registerFetchPubMedContentTool(server) {
|
|
|
67
67
|
critical: true,
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
|
+
//# sourceMappingURL=registration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registration.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/pubmedFetchContents/registration.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EACL,YAAY,EACZ,MAAM,EAEN,qBAAqB,GACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEL,8BAA8B,EAC9B,wBAAwB,GACzB,MAAM,YAAY,CAAC;AAEpB;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,+BAA+B,CACnD,MAAiB;IAEjB,MAAM,SAAS,GAAG,iCAAiC,CAAC;IACpD,MAAM,QAAQ,GAAG,uBAAuB,CAAC;IACzC,MAAM,eAAe,GACnB,8eAA8e,CAAC;IAEjf,MAAM,OAAO,GAAG,qBAAqB,CAAC,oBAAoB,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;IAE1E,MAAM,YAAY,CAAC,QAAQ,CACzB,KAAK,IAAI,EAAE;QACT,MAAM,CAAC,IAAI,CACT,QAAQ,EACR,eAAe,EACf,8BAA8B,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,EAChD,KAAK,EACH,KAA+B,E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AAC;QAEF,MAAM,CAAC,MAAM,CAAC,SAAS,QAAQ,eAAe,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC,EACD;QACE,SAAS;QACT,OAAO;QACP,SAAS,EAAE,aAAa,CAAC,qBAAqB;QAC9C,QAAQ,EAAE,IAAI;KACf,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @fileoverview Barrel export for the '
|
|
2
|
+
* @fileoverview Barrel export for the 'pubmed_generate_chart' tool.
|
|
3
3
|
* This file re-exports the registration function for the tool,
|
|
4
4
|
* making it easier to import and register with the MCP server.
|
|
5
|
-
* @module src/mcp-server/tools/
|
|
5
|
+
* @module src/mcp-server/tools/pubmedGenerateChart/index
|
|
6
6
|
*/
|
|
7
7
|
export * from "./registration.js";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/pubmedGenerateChart/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,cAAc,mBAAmB,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @fileoverview Barrel export for the '
|
|
2
|
+
* @fileoverview Barrel export for the 'pubmed_generate_chart' tool.
|
|
3
3
|
* This file re-exports the registration function for the tool,
|
|
4
4
|
* making it easier to import and register with the MCP server.
|
|
5
|
-
* @module src/mcp-server/tools/
|
|
5
|
+
* @module src/mcp-server/tools/pubmedGenerateChart/index
|
|
6
6
|
*/
|
|
7
7
|
export * from "./registration.js";
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/pubmedGenerateChart/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,cAAc,mBAAmB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { RequestContext } from "../../../utils/index.js";
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const PubMedGenerateChartInputSchema: z.ZodObject<{
|
|
4
4
|
chartType: z.ZodEnum<["bar", "line", "scatter", "pie", "doughnut", "bubble", "radar", "polarArea"]>;
|
|
5
5
|
title: z.ZodOptional<z.ZodString>;
|
|
6
6
|
width: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
@@ -34,10 +34,11 @@ export declare const GeneratePubMedChartInputSchema: z.ZodObject<{
|
|
|
34
34
|
seriesField?: string | undefined;
|
|
35
35
|
sizeField?: string | undefined;
|
|
36
36
|
}>;
|
|
37
|
-
export type
|
|
38
|
-
export type
|
|
37
|
+
export type PubMedGenerateChartInput = z.infer<typeof PubMedGenerateChartInputSchema>;
|
|
38
|
+
export type PubMedGenerateChartOutput = {
|
|
39
39
|
base64Data: string;
|
|
40
40
|
chartType: string;
|
|
41
41
|
dataPoints: number;
|
|
42
42
|
};
|
|
43
|
-
export declare function
|
|
43
|
+
export declare function pubmedGenerateChartLogic(input: PubMedGenerateChartInput, parentRequestContext: RequestContext): Promise<PubMedGenerateChartOutput>;
|
|
44
|
+
//# sourceMappingURL=logic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logic.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/pubmedGenerateChart/logic.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAEL,cAAc,EAGf,MAAM,yBAAyB,CAAC;AAEjC,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyDzC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAC5C,OAAO,8BAA8B,CACtC,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAoBF,wBAAsB,wBAAwB,CAC5C,KAAK,EAAE,wBAAwB,EAC/B,oBAAoB,EAAE,cAAc,GACnC,OAAO,CAAC,yBAAyB,CAAC,CAkKpC"}
|