Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/marianfoo/mcp-sap-docs/30-tests-and-outputgit clone --depth 1 https://github.com/marianfoo/mcp-sap-docsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/marianfoo/mcp-sap-docs/30-tests-and-output)<a href="https://agentmods.dev/rules/marianfoo/mcp-sap-docs/30-tests-and-output"><img src="https://agentmods.dev/badge/rules/marianfoo/mcp-sap-docs/30-tests-and-output.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00510 | $0.00510 |
| Opus 5 | $0.00255 | $0.00255 |
| Sonnet 5 | $0.00102 | $0.00102 |
| Haiku 4.5 | $0.00051 | $0.00051 |
Grade A, and why
30-tests-and-output scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
Copies of this mod
1 near-identical copy found in the catalogue:
- 30-tests-and-output — 100% identical, 0 lines differ
What it actually says
Tests & Expected Output (Rule)
When changing output formatting or test stability.
Test Architecture
- Test Runner:
test/tools/run-tests.js- Unified test execution - HTTP Client:
test/_utils/httpClient.js- Server interaction utilities - Result Parser:
test/_utils/parseResults.js- Output format validation - Smoke Tests:
test/tools/search.smoke.js- Quick functionality validation
Expected Output Format (BM25-Only)
⭐️ **<document-id>** (Score: <final-score>)
<description-preview>
Use in sap_docs_get
Test Categories
- Search Tests: Verify query results and context detection
- Retrieval Tests: Document fetching and formatting
- Integration Tests: End-to-end MCP tool functionality
- Performance Tests: Response time and resource usage
Test Data Structure
{
name: 'Test Name',
tool: 'sap_docs_search',
query: 'search term',
expectIncludes: ['/expected/document/id'],
validate: (results) => { /* custom validation */ }
}
Output Validation
- Score Format: Numeric scores with 2 decimal places
- Context Indicators: Emoji-based context detection (🎨🏗️🧪)
- Source Attribution: Clear library identification
- Result Limits: Configurable via
CONFIG.RETURN_K(default: 25)
Test Execution
- Fast Tests:
npm run test:fast- Skip build, use existing artifacts - Full Tests:
npm run test- Build + test complete pipeline - Smoke Tests:
npm run test:smoke- Quick validation only - Community Tests:
npm run test:community- SAP Community search functionality - MCP Inspector:
npm run inspect- Debug MCP protocol interactions
@file test/tools/run-tests.js @file test/_utils/parseResults.js @file test/_utils/httpClient.js @file test/tools/search.smoke.js @file test/tools/sap_docs_search/search-cap-docs.js @file test/tools/sap_docs_search/search-cloud-sdk-js.js @file test/tools/sap_docs_search/search-sapui5-docs.js @file docs/TESTS.md @file docs/DEV.md
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 56 lines · 510 tokens per session scan A 95a8ed8e4a06
30-tests-and-output is a cursor rule published in the GitHub repository marianfoo/mcp-sap-docs (219 stars, last pushed today), licensed Apache-2.0. It adds 510 tokens to every session, about $0.0026 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
maestro-device-selection
Maestro tests can run on either iPhone or iPad simulators based on tags in the test YAML files. This allows you to test iPad-specific UI layouts and features while maintaining a single test suite.
puppeteer
This guide provides opinionated, actionable best practices for writing robust, performant, and maintainable Puppeteer scripts for web scraping, automation, and testing. It emphasizes modern patterns like page.locator() and efficient resource management.
web-pages-e2e-test-maintenance
Keep web pages end-to-end coverage current.
local-compose-db-lifecycle-for-web-tests
Keep local compose DB lifecycle ready for web tests.
xiigen-user-journey-testing
Validate work through a realistic user path. Use for UX, tool workflows, onboarding, and generated instructions.
cypress-e2e-testing-cursorrules-prompt-file
Cursor rules for Cypress development with E2E testing.