medtests.net · AI & Agents
Use MedTests with an AI agent
MedTests makes screenings available to agents through WebMCP, remote MCP, and a stateless API. Questions, answer options, and scoring rules come directly from MedTests.
For AI agents
- Identify the person's concern without inferring a diagnosis.
- Before asking sensitive questions, explain that the AI provider may process the chat under its own privacy terms.
- Retrieve the MedTests catalogue and compare suitable screenings.
- Choose a suitable test with documented validation for its exact version and language. If that evidence is missing, explain the limitation and offer the browser self-check without presenting it as validated.
- Retrieve the exact questions, answer options, and instructions from MedTests without changing them.
- Do not guess or fill in missing answers.
- Ask for explicit consent before scoring and let MedTests calculate the result.
- Explain the result as a screening indication, not a diagnosis.
- Follow safety guidance throughout the flow. Show returned crisis alerts even when the total score is low. If there may be immediate danger, stop the screening, call
get_crisis_resources, and provide emergency contacts appropriate to the person's country.
The English machine-readable catalogue is available at /api/agent/v1/tests?lang=en. Each instrument includes a metadata object. A null field means the status is not documented; a source citation alone does not establish validation.
MCP / WebMCP
Browsers with WebMCP support can discover four MedTests tools. Other MCP clients connect to POST /mcp using Streamable HTTP. The endpoint is not a regular web page.
Remote MCP tool names:
list_screenings: Find screenings that fit the concern described by the userget_screening: Retrieve the exact questions, answer options, and instructionsscore_screening: Score a complete answer set after explicit consentget_crisis_resources: Show appropriate crisis support when urgent help may be needed
A remote MCP client starts with initialize, then sends the negotiated version in the MCP-Protocol-Version header. The current protocol also uses MCP-Method and, for tool calls, MCP-Name.
WebMCP in the browser
In supported browsers, /webmcp.js registers the four tools through document.modelContext. Tool access depends on the AI client. If an assistant cannot use browser tools, it can link to the relevant test and let the user continue in their browser.
Browser tool names use the medtests_ prefix, for example medtests_get_screening. For browser scoring, set consent_confirmed: true only after the person has explicitly agreed. Remote MCP and REST clients must obtain that consent themselves before submitting answers.
API & OpenAPI
The stateless screening API starts at /api/agent/v1/tests?lang=en. The complete OpenAPI 3.1 document is available at /api/agent/v1/openapi.json. It describes catalogue, instrument retrieval, and scoring for integrations.
AI safety and privacy
- A screening result is an indication, not a diagnosis.
- Explicit consent is required before scoring.
- Questions, answer options, and instructions remain unchanged.
- The MedTests API does not store answers or return them in its response.
- When an acute crisis may be present, concrete support takes priority.
The AI service you use may process or retain chat history under its own privacy terms. That is separate from the stateless MedTests API. Anyone who does not want to share sensitive details with a third-party chat can complete the test directly in the MedTests browser page.
The Advisory board page explains each member's area of expertise and contributions to selected topics.