Commit 318e664
Add educational SAMPLE_TOOL_NAME environment variable feature
Implements optional dynamic tool registration via environment variable for educational purposes. When SAMPLE_TOOL_NAME is set, a simple echo tool is registered with that name, demonstrating runtime configuration patterns common in MCP servers.
Changes:
- Add conditional tool registration in registerCoreTools() that checks for SAMPLE_TOOL_NAME env var
- Tool takes a 'value' string parameter and returns 'test string print: {value}'
- Document the feature in README.md as an educational example of runtime configuration
- Minimal implementation with zero impact when env var is not set
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent fb282ca commit 318e664
2 files changed
+34
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
224 | 230 | | |
225 | 231 | | |
226 | 232 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
226 | 254 | | |
227 | 255 | | |
228 | 256 | | |
| |||
0 commit comments