20-tools-and-apis.mdc•1.72 kB
# MCP Tools & HTTP Endpoints (Rule)
For tool schemas, request/response formats, and endpoints.
## MCP Tools (5 total)
- **`sap_docs_search`**: Main search across all documentation sources
- **`sap_docs_get`**: Retrieve specific documents by ID
- **`sap_community_search`**: Search SAP Community posts with full content
- **`sap_help_search`**: Search SAP Help Portal using private APIs
- **`sap_help_get`**: Retrieve full SAP Help page content
## Server Implementations
- **Stdio MCP**: `src/server.ts` - Main MCP server for Claude integration
- **HTTP Test Server**: `src/http-server.ts` - Development server (port 3001)
- Endpoints: `/status`, `/healthz`, `/readyz`, `/mcp`
- **Streamable HTTP**: `src/streamable-http-server.ts` - Production HTTP MCP (port 3122)
- Endpoints: `/mcp`, `/health`
## Response Formats
- **Search Results**: `⭐️ **<id>** (Score: <score>)` format
- **Context Detection**: Emoji indicators (🎨 UI5, 🏗️ CAP, 🧪 wdi5)
- **Source Attribution**: Library grouping with clear source identification
## Integration Points
- **Community**: HTML scraping + LiQL API for post content
- **SAP Help**: Private elasticsearch + metadata + page content APIs
- **Local Docs**: File system access with URL generation
## Configuration
- **Tool Descriptions**: Comprehensive help text in server implementations
- **Input Schemas**: Detailed parameter descriptions and examples
- **Error Handling**: Graceful fallbacks and informative error messages
@file src/server.ts
@file src/http-server.ts
@file src/streamable-http-server.ts
@file src/lib/localDocs.ts
@file src/lib/sapHelp.ts
@file src/lib/communityBestMatch.ts
@file src/lib/types.ts
@file docs/ARCHITECTURE.md
@file docs/DEV.md