Skip to content

Tests

FlowMCP v3.0.0 requires a minimum of 3 tests per tool, resource query, and agent. Tests serve as both validation and documentation of expected behavior.

Each tool in main.tools must have at least 3 test entries:

tools: {
getPrice: {
method: 'GET',
path: '/simple/price',
description: 'Get token price',
parameters: [...],
tests: [
{ _description: 'Basic price lookup', vs_currencies: 'usd', ids: 'bitcoin' },
{ _description: 'Multi-token query', vs_currencies: 'usd', ids: 'bitcoin,ethereum' },
{ _description: 'Alternative currency', vs_currencies: 'eur', ids: 'bitcoin' }
]
}
}

Agent tests validate tool selection (deterministic) and content assertions (partial):

{
"_description": "Cross-provider analysis",
"input": "Compare TVL of Aave on Ethereum vs Arbitrum",
"expectedTools": ["defillama/tool/getProtocolTvl"],
"expectedContent": ["TVL", "Ethereum", "Arbitrum"]
}
LevelFieldDeterministic?Description
Tool UsageexpectedToolsYesWhich tools the agent must call
ContentexpectedContentPartialStrings the response should contain
QualityManual reviewNoSubjective assessment
Primitivev2 Minimumv3 Minimum
Tool1 test3 tests
Resource query1 test3 tests
AgentN/A3 tests
Terminal window
# Test a single schema
flowmcp test single path/to/schema.mjs
# Test all project schemas
flowmcp test project