hive-skills 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) hide show
  1. package/LICENSE +28 -0
  2. package/README.md +235 -0
  3. package/assets/LICENSE +32 -0
  4. package/assets/THIRD_PARTY_NOTICES.md +72 -0
  5. package/assets/manifest.json +1290 -0
  6. package/assets/skills/authored/code-review/composable/BUNDLE.md +192 -0
  7. package/assets/skills/authored/code-review/composable/INDEX.md +13 -0
  8. package/assets/skills/authored/code-review/composable/VERSION +1 -0
  9. package/assets/skills/authored/code-review/composable/mini/01-review-method.md +34 -0
  10. package/assets/skills/authored/code-review/composable/mini/02-security-review.md +20 -0
  11. package/assets/skills/authored/code-review/composable/mini/03-correctness-bugs.md +19 -0
  12. package/assets/skills/authored/code-review/composable/mini/04-concurrency.md +16 -0
  13. package/assets/skills/authored/code-review/composable/mini/05-error-handling.md +12 -0
  14. package/assets/skills/authored/code-review/composable/mini/06-performance.md +11 -0
  15. package/assets/skills/authored/code-review/composable/mini/07-api-design.md +20 -0
  16. package/assets/skills/authored/code-review/composable/mini/08-missing-tests.md +25 -0
  17. package/assets/skills/authored/code-review/composable/mini/09-refactoring-and-communication.md +32 -0
  18. package/assets/skills/authored/data-analysis/composable/BUNDLE.md +186 -0
  19. package/assets/skills/authored/data-analysis/composable/INDEX.md +13 -0
  20. package/assets/skills/authored/data-analysis/composable/VERSION +1 -0
  21. package/assets/skills/authored/data-analysis/composable/mini/01-data-quality-profiling.md +26 -0
  22. package/assets/skills/authored/data-analysis/composable/mini/02-aggregation-pitfalls.md +21 -0
  23. package/assets/skills/authored/data-analysis/composable/mini/03-time-series.md +19 -0
  24. package/assets/skills/authored/data-analysis/composable/mini/04-segmentation.md +23 -0
  25. package/assets/skills/authored/data-analysis/composable/mini/05-discount-pricing.md +17 -0
  26. package/assets/skills/authored/data-analysis/composable/mini/06-insight-generation.md +25 -0
  27. package/assets/skills/authored/data-analysis/composable/mini/07-executive-writing.md +26 -0
  28. package/assets/skills/authored/data-analysis/composable/mini/08-recommendations.md +20 -0
  29. package/assets/skills/authored/data-analysis/composable/mini/09-reproducibility-assumptions.md +20 -0
  30. package/assets/skills/authored/financial-analysis/composable/BUNDLE.md +1293 -0
  31. package/assets/skills/authored/financial-analysis/composable/INDEX.md +17 -0
  32. package/assets/skills/authored/financial-analysis/composable/VERSION +1 -0
  33. package/assets/skills/authored/financial-analysis/composable/mini/00-core.md +69 -0
  34. package/assets/skills/authored/financial-analysis/composable/mini/01-profitability-efficiency-ratios.md +173 -0
  35. package/assets/skills/authored/financial-analysis/composable/mini/02-liquidity-leverage-ratios.md +120 -0
  36. package/assets/skills/authored/financial-analysis/composable/mini/03-valuation-ratios-interpretation.md +107 -0
  37. package/assets/skills/authored/financial-analysis/composable/mini/04-dcf-projection-wacc.md +122 -0
  38. package/assets/skills/authored/financial-analysis/composable/mini/05-dcf-terminal-value-sensitivity.md +75 -0
  39. package/assets/skills/authored/financial-analysis/composable/mini/06-comparables-precedents.md +78 -0
  40. package/assets/skills/authored/financial-analysis/composable/mini/07-budget-variance-analysis.md +47 -0
  41. package/assets/skills/authored/financial-analysis/composable/mini/08-driver-based-forecasting-scenarios.md +111 -0
  42. package/assets/skills/authored/financial-analysis/composable/mini/09-rolling-forecasts-accuracy.md +114 -0
  43. package/assets/skills/authored/financial-analysis/composable/mini/10-reporting-exec-summary.md +58 -0
  44. package/assets/skills/authored/financial-analysis/composable/mini/11-industry-adaptations.md +130 -0
  45. package/assets/skills/authored/financial-analysis/composable/mini/12-toolkit-scripts-io.md +102 -0
  46. package/assets/skills/authored/python-api/composable/BUNDLE.md +389 -0
  47. package/assets/skills/authored/python-api/composable/INDEX.md +13 -0
  48. package/assets/skills/authored/python-api/composable/VERSION +1 -0
  49. package/assets/skills/authored/python-api/composable/mini/01-project-structure.md +44 -0
  50. package/assets/skills/authored/python-api/composable/mini/02-routing-and-app.md +38 -0
  51. package/assets/skills/authored/python-api/composable/mini/03-pydantic-models.md +45 -0
  52. package/assets/skills/authored/python-api/composable/mini/04-validation-and-errors.md +59 -0
  53. package/assets/skills/authored/python-api/composable/mini/05-dependencies-and-auth.md +60 -0
  54. package/assets/skills/authored/python-api/composable/mini/06-pagination-filtering.md +44 -0
  55. package/assets/skills/authored/python-api/composable/mini/07-async-performance.md +30 -0
  56. package/assets/skills/authored/python-api/composable/mini/08-testing.md +45 -0
  57. package/assets/skills/authored/python-api/composable/mini/09-middleware-observability.md +29 -0
  58. package/assets/skills/authored/tech-writing/composable/BUNDLE.md +220 -0
  59. package/assets/skills/authored/tech-writing/composable/INDEX.md +12 -0
  60. package/assets/skills/authored/tech-writing/composable/VERSION +1 -0
  61. package/assets/skills/authored/tech-writing/composable/mini/01-audience-analysis.md +26 -0
  62. package/assets/skills/authored/tech-writing/composable/mini/02-document-types.md +27 -0
  63. package/assets/skills/authored/tech-writing/composable/mini/03-readme-quickstart-changelog.md +22 -0
  64. package/assets/skills/authored/tech-writing/composable/mini/04-information-architecture.md +21 -0
  65. package/assets/skills/authored/tech-writing/composable/mini/05-style-clarity.md +29 -0
  66. package/assets/skills/authored/tech-writing/composable/mini/06-breaking-changes-migrations.md +33 -0
  67. package/assets/skills/authored/tech-writing/composable/mini/07-troubleshooting-security.md +30 -0
  68. package/assets/skills/authored/tech-writing/composable/mini/08-faq-voice-tone.md +32 -0
  69. package/assets/skills/converted/claude-api/composable/BUNDLE.md +14996 -0
  70. package/assets/skills/converted/claude-api/composable/INDEX.md +98 -0
  71. package/assets/skills/converted/claude-api/composable/VERSION +1 -0
  72. package/assets/skills/converted/claude-api/composable/mini/00-core.md +235 -0
  73. package/assets/skills/converted/claude-api/composable/mini/01-model-api-quick-reference.md +258 -0
  74. package/assets/skills/converted/claude-api/composable/mini/02-common-pitfalls.md +42 -0
  75. package/assets/skills/converted/claude-api/composable/mini/10-models.md +135 -0
  76. package/assets/skills/converted/claude-api/composable/mini/11-platform-availability.md +96 -0
  77. package/assets/skills/converted/claude-api/composable/mini/12-claude-platform-on-aws.md +59 -0
  78. package/assets/skills/converted/claude-api/composable/mini/13-live-sources.md +143 -0
  79. package/assets/skills/converted/claude-api/composable/mini/14-error-codes.md +256 -0
  80. package/assets/skills/converted/claude-api/composable/mini/15-prompt-caching.md +223 -0
  81. package/assets/skills/converted/claude-api/composable/mini/16-token-counting.md +56 -0
  82. package/assets/skills/converted/claude-api/composable/mini/17-tool-use-concepts.md +444 -0
  83. package/assets/skills/converted/claude-api/composable/mini/18-agent-design.md +101 -0
  84. package/assets/skills/converted/claude-api/composable/mini/19-anthropic-cli.md +246 -0
  85. package/assets/skills/converted/claude-api/composable/mini/20-model-migration.md +1301 -0
  86. package/assets/skills/converted/claude-api/composable/mini/30-managed-agents-overview.md +71 -0
  87. package/assets/skills/converted/claude-api/composable/mini/31-managed-agents-core.md +278 -0
  88. package/assets/skills/converted/claude-api/composable/mini/32-managed-agents-environments.md +219 -0
  89. package/assets/skills/converted/claude-api/composable/mini/33-managed-agents-tools.md +366 -0
  90. package/assets/skills/converted/claude-api/composable/mini/34-managed-agents-events.md +252 -0
  91. package/assets/skills/converted/claude-api/composable/mini/35-managed-agents-outcomes.md +106 -0
  92. package/assets/skills/converted/claude-api/composable/mini/36-managed-agents-multiagent.md +101 -0
  93. package/assets/skills/converted/claude-api/composable/mini/37-managed-agents-webhooks.md +123 -0
  94. package/assets/skills/converted/claude-api/composable/mini/38-managed-agents-memory.md +197 -0
  95. package/assets/skills/converted/claude-api/composable/mini/39-managed-agents-scheduled-deployments.md +146 -0
  96. package/assets/skills/converted/claude-api/composable/mini/40-managed-agents-client-patterns.md +211 -0
  97. package/assets/skills/converted/claude-api/composable/mini/41-managed-agents-onboarding.md +82 -0
  98. package/assets/skills/converted/claude-api/composable/mini/42-managed-agents-api-reference.md +441 -0
  99. package/assets/skills/converted/claude-api/composable/mini/43-managed-agents-self-hosted-sandboxes.md +174 -0
  100. package/assets/skills/converted/claude-api/composable/mini/50-python-readme.md +564 -0
  101. package/assets/skills/converted/claude-api/composable/mini/51-python-tool-use.md +590 -0
  102. package/assets/skills/converted/claude-api/composable/mini/52-python-streaming-batches-files.md +549 -0
  103. package/assets/skills/converted/claude-api/composable/mini/53-python-managed-agents.md +335 -0
  104. package/assets/skills/converted/claude-api/composable/mini/55-typescript-readme.md +404 -0
  105. package/assets/skills/converted/claude-api/composable/mini/56-typescript-tool-use.md +548 -0
  106. package/assets/skills/converted/claude-api/composable/mini/57-typescript-streaming-batches-files.md +384 -0
  107. package/assets/skills/converted/claude-api/composable/mini/58-typescript-managed-agents.md +358 -0
  108. package/assets/skills/converted/claude-api/composable/mini/60-csharp-readme.md +361 -0
  109. package/assets/skills/converted/claude-api/composable/mini/61-csharp-tool-use.md +163 -0
  110. package/assets/skills/converted/claude-api/composable/mini/62-csharp-streaming-batches-files.md +64 -0
  111. package/assets/skills/converted/claude-api/composable/mini/65-go-readme.md +185 -0
  112. package/assets/skills/converted/claude-api/composable/mini/66-go-tool-use.md +219 -0
  113. package/assets/skills/converted/claude-api/composable/mini/67-go-streaming-files.md +63 -0
  114. package/assets/skills/converted/claude-api/composable/mini/68-go-managed-agents.md +564 -0
  115. package/assets/skills/converted/claude-api/composable/mini/70-java-readme.md +237 -0
  116. package/assets/skills/converted/claude-api/composable/mini/71-java-tool-use.md +227 -0
  117. package/assets/skills/converted/claude-api/composable/mini/72-java-streaming-files.md +49 -0
  118. package/assets/skills/converted/claude-api/composable/mini/73-java-managed-agents.md +443 -0
  119. package/assets/skills/converted/claude-api/composable/mini/75-php-readme.md +173 -0
  120. package/assets/skills/converted/claude-api/composable/mini/76-php-tool-use.md +252 -0
  121. package/assets/skills/converted/claude-api/composable/mini/77-php-streaming-batches-files.md +53 -0
  122. package/assets/skills/converted/claude-api/composable/mini/78-php-managed-agents.md +443 -0
  123. package/assets/skills/converted/claude-api/composable/mini/80-ruby-readme.md +133 -0
  124. package/assets/skills/converted/claude-api/composable/mini/81-ruby-tool-use-streaming.md +56 -0
  125. package/assets/skills/converted/claude-api/composable/mini/82-ruby-managed-agents.md +394 -0
  126. package/assets/skills/converted/claude-api/composable/mini/85-curl-examples.md +255 -0
  127. package/assets/skills/converted/claude-api/composable/mini/86-curl-managed-agents.md +340 -0
  128. package/assets/skills/converted/claude-api/composable/presets/csharp.md +1151 -0
  129. package/assets/skills/converted/claude-api/composable/presets/curl.md +1154 -0
  130. package/assets/skills/converted/claude-api/composable/presets/go.md +1598 -0
  131. package/assets/skills/converted/claude-api/composable/presets/java.md +1523 -0
  132. package/assets/skills/converted/claude-api/composable/presets/php.md +1488 -0
  133. package/assets/skills/converted/claude-api/composable/presets/python.md +2605 -0
  134. package/assets/skills/converted/claude-api/composable/presets/ruby.md +1146 -0
  135. package/assets/skills/converted/claude-api/composable/presets/shared.md +6478 -0
  136. package/assets/skills/converted/claude-api/composable/presets/typescript.md +2261 -0
  137. package/assets/skills/converted/docx/composable/BUNDLE.md +617 -0
  138. package/assets/skills/converted/docx/composable/INDEX.md +12 -0
  139. package/assets/skills/converted/docx/composable/VERSION +1 -0
  140. package/assets/skills/converted/docx/composable/mini/00-core.md +26 -0
  141. package/assets/skills/converted/docx/composable/mini/01-reading-converting.md +36 -0
  142. package/assets/skills/converted/docx/composable/mini/02-creating-setup-layout.md +85 -0
  143. package/assets/skills/converted/docx/composable/mini/03-creating-elements.md +257 -0
  144. package/assets/skills/converted/docx/composable/mini/04-editing-existing.md +57 -0
  145. package/assets/skills/converted/docx/composable/mini/05-xml-reference.md +128 -0
  146. package/assets/skills/converted/internal-comms/composable/BUNDLE.md +220 -0
  147. package/assets/skills/converted/internal-comms/composable/INDEX.md +11 -0
  148. package/assets/skills/converted/internal-comms/composable/VERSION +1 -0
  149. package/assets/skills/converted/internal-comms/composable/mini/00-core.md +30 -0
  150. package/assets/skills/converted/internal-comms/composable/mini/01-3p-updates.md +49 -0
  151. package/assets/skills/converted/internal-comms/composable/mini/02-company-newsletter.md +67 -0
  152. package/assets/skills/converted/internal-comms/composable/mini/03-faq-answers.md +32 -0
  153. package/assets/skills/converted/internal-comms/composable/mini/04-general-comms.md +18 -0
  154. package/assets/skills/converted/mcp-builder/composable/BUNDLE.md +2460 -0
  155. package/assets/skills/converted/mcp-builder/composable/INDEX.md +23 -0
  156. package/assets/skills/converted/mcp-builder/composable/VERSION +1 -0
  157. package/assets/skills/converted/mcp-builder/composable/mini/00-core.md +43 -0
  158. package/assets/skills/converted/mcp-builder/composable/mini/01-workflow-research-planning.md +54 -0
  159. package/assets/skills/converted/mcp-builder/composable/mini/02-implementation-process.md +78 -0
  160. package/assets/skills/converted/mcp-builder/composable/mini/03-naming-conventions.md +33 -0
  161. package/assets/skills/converted/mcp-builder/composable/mini/04-response-formats.md +21 -0
  162. package/assets/skills/converted/mcp-builder/composable/mini/05-pagination.md +24 -0
  163. package/assets/skills/converted/mcp-builder/composable/mini/06-transport.md +47 -0
  164. package/assets/skills/converted/mcp-builder/composable/mini/07-annotations.md +20 -0
  165. package/assets/skills/converted/mcp-builder/composable/mini/08-security.md +35 -0
  166. package/assets/skills/converted/mcp-builder/composable/mini/09-error-handling.md +32 -0
  167. package/assets/skills/converted/mcp-builder/composable/mini/10-testing-and-documentation.md +21 -0
  168. package/assets/skills/converted/mcp-builder/composable/mini/11-python-implementation.md +432 -0
  169. package/assets/skills/converted/mcp-builder/composable/mini/12-python-advanced-and-checklist.md +233 -0
  170. package/assets/skills/converted/mcp-builder/composable/mini/13-node-implementation.md +717 -0
  171. package/assets/skills/converted/mcp-builder/composable/mini/14-node-advanced-and-checklist.md +200 -0
  172. package/assets/skills/converted/mcp-builder/composable/mini/15-evaluation-design.md +200 -0
  173. package/assets/skills/converted/mcp-builder/composable/mini/16-evaluation-running.md +198 -0
  174. package/assets/skills/converted/mcp-builder/composable/presets/node-server.md +1381 -0
  175. package/assets/skills/converted/mcp-builder/composable/presets/python-server.md +1129 -0
  176. package/assets/skills/converted/pdf/composable/BUNDLE.md +1284 -0
  177. package/assets/skills/converted/pdf/composable/INDEX.md +14 -0
  178. package/assets/skills/converted/pdf/composable/VERSION +1 -0
  179. package/assets/skills/converted/pdf/composable/mini/00-core.md +46 -0
  180. package/assets/skills/converted/pdf/composable/mini/01-creation.md +176 -0
  181. package/assets/skills/converted/pdf/composable/mini/02-extraction.md +178 -0
  182. package/assets/skills/converted/pdf/composable/mini/03-merge-split-manipulate.md +240 -0
  183. package/assets/skills/converted/pdf/composable/mini/04-images-ocr.md +168 -0
  184. package/assets/skills/converted/pdf/composable/mini/05-encryption.md +51 -0
  185. package/assets/skills/converted/pdf/composable/mini/06-forms.md +300 -0
  186. package/assets/skills/converted/pdf/composable/mini/07-libraries-reference.md +89 -0
  187. package/assets/skills/converted/pptx/composable/BUNDLE.md +911 -0
  188. package/assets/skills/converted/pptx/composable/INDEX.md +12 -0
  189. package/assets/skills/converted/pptx/composable/VERSION +1 -0
  190. package/assets/skills/converted/pptx/composable/mini/00-core.md +37 -0
  191. package/assets/skills/converted/pptx/composable/mini/01-reading.md +37 -0
  192. package/assets/skills/converted/pptx/composable/mini/02-creating-from-scratch.md +422 -0
  193. package/assets/skills/converted/pptx/composable/mini/03-editing-templates.md +207 -0
  194. package/assets/skills/converted/pptx/composable/mini/04-design.md +89 -0
  195. package/assets/skills/converted/pptx/composable/mini/05-qa-and-rendering.md +91 -0
  196. package/assets/skills/converted/pptx/composable/presets/creating.md +659 -0
  197. package/assets/skills/converted/pptx/composable/presets/editing.md +485 -0
  198. package/assets/skills/converted/skill-creator/composable/BUNDLE.md +1681 -0
  199. package/assets/skills/converted/skill-creator/composable/INDEX.md +21 -0
  200. package/assets/skills/converted/skill-creator/composable/VERSION +1 -0
  201. package/assets/skills/converted/skill-creator/composable/mini/00-core.md +59 -0
  202. package/assets/skills/converted/skill-creator/composable/mini/01-creating-a-skill.md +27 -0
  203. package/assets/skills/converted/skill-creator/composable/mini/02-skill-writing-guide.md +71 -0
  204. package/assets/skills/converted/skill-creator/composable/mini/03-test-cases.md +21 -0
  205. package/assets/skills/converted/skill-creator/composable/mini/04-running-and-evaluating.md +128 -0
  206. package/assets/skills/converted/skill-creator/composable/mini/05-improving-the-skill.md +30 -0
  207. package/assets/skills/converted/skill-creator/composable/mini/06-blind-comparison.md +5 -0
  208. package/assets/skills/converted/skill-creator/composable/mini/07-description-optimization.md +74 -0
  209. package/assets/skills/converted/skill-creator/composable/mini/08-packaging.md +11 -0
  210. package/assets/skills/converted/skill-creator/composable/mini/09-environment-specific.md +38 -0
  211. package/assets/skills/converted/skill-creator/composable/mini/10-scripts-and-references.md +34 -0
  212. package/assets/skills/converted/skill-creator/composable/mini/11-json-schemas.md +414 -0
  213. package/assets/skills/converted/skill-creator/composable/mini/12-agent-grader.md +225 -0
  214. package/assets/skills/converted/skill-creator/composable/mini/13-agent-comparator.md +204 -0
  215. package/assets/skills/converted/skill-creator/composable/mini/14-agent-analyzer.md +276 -0
  216. package/assets/skills/converted/skill-creator/composable/presets/authoring.md +198 -0
  217. package/assets/skills/converted/skill-creator/composable/presets/evaluating.md +1334 -0
  218. package/assets/skills/converted/skill-creator/composable/presets/optimizing.md +160 -0
  219. package/assets/skills/converted/skill-creator/composable/presets.json +5 -0
  220. package/assets/skills/meta/ccs-skill-creator/composable/BUNDLE.md +465 -0
  221. package/assets/skills/meta/ccs-skill-creator/composable/INDEX.md +8 -0
  222. package/assets/skills/meta/ccs-skill-creator/composable/VERSION +1 -0
  223. package/assets/skills/meta/ccs-skill-creator/composable/mini/00-core.md +46 -0
  224. package/assets/skills/meta/ccs-skill-creator/composable/mini/01-create-new-skill.md +167 -0
  225. package/assets/skills/meta/ccs-skill-creator/composable/mini/02-convert-existing-skill.md +120 -0
  226. package/assets/skills/meta/ccs-skill-creator/composable/mini/03-review-and-maintain.md +112 -0
  227. package/assets/skills/sources/anthropic/PROVENANCE.md +3 -0
  228. package/assets/skills/sources/anthropic/claude-api/LICENSE.txt +202 -0
  229. package/assets/skills/sources/anthropic/docx/LICENSE.txt +30 -0
  230. package/assets/skills/sources/anthropic/internal-comms/LICENSE.txt +202 -0
  231. package/assets/skills/sources/anthropic/mcp-builder/LICENSE.txt +202 -0
  232. package/assets/skills/sources/anthropic/pdf/LICENSE.txt +30 -0
  233. package/assets/skills/sources/anthropic/pptx/LICENSE.txt +30 -0
  234. package/assets/skills/sources/anthropic/skill-creator/LICENSE.txt +202 -0
  235. package/assets/skills/sources/financial-analyst/PROVENANCE.md +1 -0
  236. package/assets/tools/hive.py +728 -0
  237. package/dist/cli.js +7494 -0
  238. package/package.json +40 -0
@@ -0,0 +1,432 @@
1
+ # Python (FastMCP) — Implementation Patterns
2
+
3
+ Python-specific best practices and code for implementing MCP servers with the MCP Python SDK (FastMCP): server setup, tool registration, input validation with Pydantic, error handling, and a complete working example. Server naming (`{service}_mcp`) and tool naming are in the naming mini; this mini is the how-in-Python.
4
+
5
+ ## MCP Python SDK and FastMCP
6
+
7
+ The official MCP Python SDK provides FastMCP, a high-level framework for building MCP servers. It provides:
8
+ - Automatic description and inputSchema generation from function signatures and docstrings
9
+ - Pydantic model integration for input validation
10
+ - Decorator-based tool registration with `@mcp.tool`
11
+
12
+ For complete SDK documentation, use WebFetch to load: `https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/main/README.md`
13
+
14
+ ## Quick Reference
15
+
16
+ ### Key imports
17
+ ```python
18
+ from mcp.server.fastmcp import FastMCP
19
+ from pydantic import BaseModel, Field, field_validator, ConfigDict
20
+ from typing import Optional, List, Dict, Any
21
+ from enum import Enum
22
+ import httpx
23
+ ```
24
+
25
+ ### Server initialization
26
+ ```python
27
+ mcp = FastMCP("service_mcp")
28
+ ```
29
+
30
+ ### Tool registration pattern
31
+ ```python
32
+ @mcp.tool(name="tool_name", annotations={...})
33
+ async def tool_function(params: InputModel) -> str:
34
+ # Implementation
35
+ pass
36
+ ```
37
+
38
+ ## Tool Structure with FastMCP
39
+
40
+ Tools are defined using the `@mcp.tool` decorator with Pydantic models for input validation. Use snake_case, action-oriented tool names with a service prefix (e.g., `slack_send_message`, `github_create_issue`, `asana_list_tasks`).
41
+
42
+ ```python
43
+ from pydantic import BaseModel, Field, ConfigDict
44
+ from mcp.server.fastmcp import FastMCP
45
+
46
+ # Initialize the MCP server
47
+ mcp = FastMCP("example_mcp")
48
+
49
+ # Define Pydantic model for input validation
50
+ class ServiceToolInput(BaseModel):
51
+ '''Input model for service tool operation.'''
52
+ model_config = ConfigDict(
53
+ str_strip_whitespace=True, # Auto-strip whitespace from strings
54
+ validate_assignment=True, # Validate on assignment
55
+ extra='forbid' # Forbid extra fields
56
+ )
57
+
58
+ param1: str = Field(..., description="First parameter description (e.g., 'user123', 'project-abc')", min_length=1, max_length=100)
59
+ param2: Optional[int] = Field(default=None, description="Optional integer parameter with constraints", ge=0, le=1000)
60
+ tags: Optional[List[str]] = Field(default_factory=list, description="List of tags to apply", max_items=10)
61
+
62
+ @mcp.tool(
63
+ name="service_tool_name",
64
+ annotations={
65
+ "title": "Human-Readable Tool Title",
66
+ "readOnlyHint": True, # Tool does not modify environment
67
+ "destructiveHint": False, # Tool does not perform destructive operations
68
+ "idempotentHint": True, # Repeated calls have no additional effect
69
+ "openWorldHint": False # Tool does not interact with external entities
70
+ }
71
+ )
72
+ async def service_tool_name(params: ServiceToolInput) -> str:
73
+ '''Tool description automatically becomes the 'description' field.
74
+
75
+ This tool performs a specific operation on the service. It validates all inputs
76
+ using the ServiceToolInput Pydantic model before processing.
77
+
78
+ Args:
79
+ params (ServiceToolInput): Validated input parameters containing:
80
+ - param1 (str): First parameter description
81
+ - param2 (Optional[int]): Optional parameter with default
82
+ - tags (Optional[List[str]]): List of tags
83
+
84
+ Returns:
85
+ str: JSON-formatted response containing operation results
86
+ '''
87
+ # Implementation here
88
+ pass
89
+ ```
90
+
91
+ ## Pydantic v2 Key Features
92
+
93
+ - Use `model_config` instead of nested `Config` class
94
+ - Use `field_validator` instead of deprecated `validator`
95
+ - Use `model_dump()` instead of deprecated `dict()`
96
+ - Validators require `@classmethod` decorator
97
+ - Type hints are required for validator methods
98
+
99
+ ```python
100
+ from pydantic import BaseModel, Field, field_validator, ConfigDict
101
+
102
+ class CreateUserInput(BaseModel):
103
+ model_config = ConfigDict(
104
+ str_strip_whitespace=True,
105
+ validate_assignment=True
106
+ )
107
+
108
+ name: str = Field(..., description="User's full name", min_length=1, max_length=100)
109
+ email: str = Field(..., description="User's email address", pattern=r'^[\w\.-]+@[\w\.-]+\.\w+$')
110
+ age: int = Field(..., description="User's age", ge=0, le=150)
111
+
112
+ @field_validator('email')
113
+ @classmethod
114
+ def validate_email(cls, v: str) -> str:
115
+ if not v.strip():
116
+ raise ValueError("Email cannot be empty")
117
+ return v.lower()
118
+ ```
119
+
120
+ ## Response Format Options
121
+
122
+ Support multiple output formats for flexibility (concept in the response-formats mini):
123
+
124
+ ```python
125
+ from enum import Enum
126
+
127
+ class ResponseFormat(str, Enum):
128
+ '''Output format for tool responses.'''
129
+ MARKDOWN = "markdown"
130
+ JSON = "json"
131
+
132
+ class UserSearchInput(BaseModel):
133
+ query: str = Field(..., description="Search query")
134
+ response_format: ResponseFormat = Field(
135
+ default=ResponseFormat.MARKDOWN,
136
+ description="Output format: 'markdown' for human-readable or 'json' for machine-readable"
137
+ )
138
+ ```
139
+
140
+ **Markdown format:** use headers, lists, and formatting for clarity; convert timestamps to human-readable format (e.g., "2024-01-15 10:30:00 UTC" instead of epoch); show display names with IDs in parentheses (e.g., "@john.doe (U123456)"); omit verbose metadata (e.g., show only one profile image URL, not all sizes); group related information logically.
141
+
142
+ **JSON format:** return complete, structured data suitable for programmatic processing; include all available fields and metadata; use consistent field names and types.
143
+
144
+ ## Pagination Implementation
145
+
146
+ ```python
147
+ class ListInput(BaseModel):
148
+ limit: Optional[int] = Field(default=20, description="Maximum results to return", ge=1, le=100)
149
+ offset: Optional[int] = Field(default=0, description="Number of results to skip for pagination", ge=0)
150
+
151
+ async def list_items(params: ListInput) -> str:
152
+ # Make API request with pagination
153
+ data = await api_request(limit=params.limit, offset=params.offset)
154
+
155
+ # Return pagination info
156
+ response = {
157
+ "total": data["total"],
158
+ "count": len(data["items"]),
159
+ "offset": params.offset,
160
+ "items": data["items"],
161
+ "has_more": data["total"] > params.offset + len(data["items"]),
162
+ "next_offset": params.offset + len(data["items"]) if data["total"] > params.offset + len(data["items"]) else None
163
+ }
164
+ return json.dumps(response, indent=2)
165
+ ```
166
+
167
+ ## Error Handling
168
+
169
+ Provide clear, actionable error messages:
170
+
171
+ ```python
172
+ def _handle_api_error(e: Exception) -> str:
173
+ '''Consistent error formatting across all tools.'''
174
+ if isinstance(e, httpx.HTTPStatusError):
175
+ if e.response.status_code == 404:
176
+ return "Error: Resource not found. Please check the ID is correct."
177
+ elif e.response.status_code == 403:
178
+ return "Error: Permission denied. You don't have access to this resource."
179
+ elif e.response.status_code == 429:
180
+ return "Error: Rate limit exceeded. Please wait before making more requests."
181
+ return f"Error: API request failed with status {e.response.status_code}"
182
+ elif isinstance(e, httpx.TimeoutException):
183
+ return "Error: Request timed out. Please try again."
184
+ return f"Error: Unexpected error occurred: {type(e).__name__}"
185
+ ```
186
+
187
+ ## Shared Utilities
188
+
189
+ Extract common functionality into reusable functions:
190
+
191
+ ```python
192
+ # Shared API request function
193
+ async def _make_api_request(endpoint: str, method: str = "GET", **kwargs) -> dict:
194
+ '''Reusable function for all API calls.'''
195
+ async with httpx.AsyncClient() as client:
196
+ response = await client.request(
197
+ method,
198
+ f"{API_BASE_URL}/{endpoint}",
199
+ timeout=30.0,
200
+ **kwargs
201
+ )
202
+ response.raise_for_status()
203
+ return response.json()
204
+ ```
205
+
206
+ ## Async/Await Best Practices
207
+
208
+ Always use async/await for network requests and I/O operations:
209
+
210
+ ```python
211
+ # Good: Async network request
212
+ async def fetch_data(resource_id: str) -> dict:
213
+ async with httpx.AsyncClient() as client:
214
+ response = await client.get(f"{API_URL}/resource/{resource_id}")
215
+ response.raise_for_status()
216
+ return response.json()
217
+
218
+ # Bad: Synchronous request
219
+ def fetch_data(resource_id: str) -> dict:
220
+ response = requests.get(f"{API_URL}/resource/{resource_id}") # Blocks
221
+ return response.json()
222
+ ```
223
+
224
+ ## Type Hints
225
+
226
+ Use type hints throughout:
227
+
228
+ ```python
229
+ from typing import Optional, List, Dict, Any
230
+
231
+ async def get_user(user_id: str) -> Dict[str, Any]:
232
+ data = await fetch_user(user_id)
233
+ return {"id": data["id"], "name": data["name"]}
234
+ ```
235
+
236
+ ## Tool Docstrings
237
+
238
+ Every tool must have comprehensive docstrings with explicit type information, including the complete schema structure for dict/JSON returns and usage examples:
239
+
240
+ ```python
241
+ async def search_users(params: UserSearchInput) -> str:
242
+ '''
243
+ Search for users in the Example system by name, email, or team.
244
+
245
+ This tool searches across all user profiles in the Example platform,
246
+ supporting partial matches and various search filters. It does NOT
247
+ create or modify users, only searches existing ones.
248
+
249
+ Args:
250
+ params (UserSearchInput): Validated input parameters containing:
251
+ - query (str): Search string to match against names/emails (e.g., "john", "@example.com", "team:marketing")
252
+ - limit (Optional[int]): Maximum results to return, between 1-100 (default: 20)
253
+ - offset (Optional[int]): Number of results to skip for pagination (default: 0)
254
+
255
+ Returns:
256
+ str: JSON-formatted string containing search results with the following schema:
257
+
258
+ Success response:
259
+ {
260
+ "total": int, # Total number of matches found
261
+ "count": int, # Number of results in this response
262
+ "offset": int, # Current pagination offset
263
+ "users": [
264
+ {
265
+ "id": str, # User ID (e.g., "U123456789")
266
+ "name": str, # Full name (e.g., "John Doe")
267
+ "email": str, # Email address (e.g., "john@example.com")
268
+ "team": str # Team name (e.g., "Marketing") - optional
269
+ }
270
+ ]
271
+ }
272
+
273
+ Error response:
274
+ "Error: <error message>" or "No users found matching '<query>'"
275
+
276
+ Examples:
277
+ - Use when: "Find all marketing team members" -> params with query="team:marketing"
278
+ - Use when: "Search for John's account" -> params with query="john"
279
+ - Don't use when: You need to create a user (use example_create_user instead)
280
+ - Don't use when: You have a user ID and need full details (use example_get_user instead)
281
+
282
+ Error Handling:
283
+ - Input validation errors are handled by Pydantic model
284
+ - Returns "Error: Rate limit exceeded" if too many requests (429 status)
285
+ - Returns "Error: Invalid API authentication" if API key is invalid (401 status)
286
+ - Returns formatted list of results or "No users found matching 'query'"
287
+ '''
288
+ ```
289
+
290
+ ## Complete Example
291
+
292
+ ```python
293
+ #!/usr/bin/env python3
294
+ '''
295
+ MCP Server for Example Service.
296
+
297
+ This server provides tools to interact with Example API, including user search,
298
+ project management, and data export capabilities.
299
+ '''
300
+
301
+ from typing import Optional, List, Dict, Any
302
+ from enum import Enum
303
+ import httpx
304
+ from pydantic import BaseModel, Field, field_validator, ConfigDict
305
+ from mcp.server.fastmcp import FastMCP
306
+
307
+ # Initialize the MCP server
308
+ mcp = FastMCP("example_mcp")
309
+
310
+ # Constants
311
+ API_BASE_URL = "https://api.example.com/v1"
312
+
313
+ # Enums
314
+ class ResponseFormat(str, Enum):
315
+ '''Output format for tool responses.'''
316
+ MARKDOWN = "markdown"
317
+ JSON = "json"
318
+
319
+ # Pydantic Models for Input Validation
320
+ class UserSearchInput(BaseModel):
321
+ '''Input model for user search operations.'''
322
+ model_config = ConfigDict(
323
+ str_strip_whitespace=True,
324
+ validate_assignment=True
325
+ )
326
+
327
+ query: str = Field(..., description="Search string to match against names/emails", min_length=2, max_length=200)
328
+ limit: Optional[int] = Field(default=20, description="Maximum results to return", ge=1, le=100)
329
+ offset: Optional[int] = Field(default=0, description="Number of results to skip for pagination", ge=0)
330
+ response_format: ResponseFormat = Field(default=ResponseFormat.MARKDOWN, description="Output format")
331
+
332
+ @field_validator('query')
333
+ @classmethod
334
+ def validate_query(cls, v: str) -> str:
335
+ if not v.strip():
336
+ raise ValueError("Query cannot be empty or whitespace only")
337
+ return v.strip()
338
+
339
+ # Shared utility functions
340
+ async def _make_api_request(endpoint: str, method: str = "GET", **kwargs) -> dict:
341
+ '''Reusable function for all API calls.'''
342
+ async with httpx.AsyncClient() as client:
343
+ response = await client.request(
344
+ method,
345
+ f"{API_BASE_URL}/{endpoint}",
346
+ timeout=30.0,
347
+ **kwargs
348
+ )
349
+ response.raise_for_status()
350
+ return response.json()
351
+
352
+ def _handle_api_error(e: Exception) -> str:
353
+ '''Consistent error formatting across all tools.'''
354
+ if isinstance(e, httpx.HTTPStatusError):
355
+ if e.response.status_code == 404:
356
+ return "Error: Resource not found. Please check the ID is correct."
357
+ elif e.response.status_code == 403:
358
+ return "Error: Permission denied. You don't have access to this resource."
359
+ elif e.response.status_code == 429:
360
+ return "Error: Rate limit exceeded. Please wait before making more requests."
361
+ return f"Error: API request failed with status {e.response.status_code}"
362
+ elif isinstance(e, httpx.TimeoutException):
363
+ return "Error: Request timed out. Please try again."
364
+ return f"Error: Unexpected error occurred: {type(e).__name__}"
365
+
366
+ # Tool definitions
367
+ @mcp.tool(
368
+ name="example_search_users",
369
+ annotations={
370
+ "title": "Search Example Users",
371
+ "readOnlyHint": True,
372
+ "destructiveHint": False,
373
+ "idempotentHint": True,
374
+ "openWorldHint": True
375
+ }
376
+ )
377
+ async def example_search_users(params: UserSearchInput) -> str:
378
+ '''Search for users in the Example system by name, email, or team.
379
+
380
+ [Full docstring as shown above]
381
+ '''
382
+ try:
383
+ # Make API request using validated parameters
384
+ data = await _make_api_request(
385
+ "users/search",
386
+ params={
387
+ "q": params.query,
388
+ "limit": params.limit,
389
+ "offset": params.offset
390
+ }
391
+ )
392
+
393
+ users = data.get("users", [])
394
+ total = data.get("total", 0)
395
+
396
+ if not users:
397
+ return f"No users found matching '{params.query}'"
398
+
399
+ # Format response based on requested format
400
+ if params.response_format == ResponseFormat.MARKDOWN:
401
+ lines = [f"# User Search Results: '{params.query}'", ""]
402
+ lines.append(f"Found {total} users (showing {len(users)})")
403
+ lines.append("")
404
+
405
+ for user in users:
406
+ lines.append(f"## {user['name']} ({user['id']})")
407
+ lines.append(f"- **Email**: {user['email']}")
408
+ if user.get('team'):
409
+ lines.append(f"- **Team**: {user['team']}")
410
+ lines.append("")
411
+
412
+ return "\n".join(lines)
413
+
414
+ else:
415
+ # Machine-readable JSON format
416
+ import json
417
+ response = {
418
+ "total": total,
419
+ "count": len(users),
420
+ "offset": params.offset,
421
+ "users": users
422
+ }
423
+ return json.dumps(response, indent=2)
424
+
425
+ except Exception as e:
426
+ return _handle_api_error(e)
427
+
428
+ if __name__ == "__main__":
429
+ mcp.run()
430
+ ```
431
+
432
+ Advanced FastMCP features (context injection, resources, structured output, lifespan, transport), Python-specific best practices, and the quality checklist are in `12-python-advanced-and-checklist.md`.
@@ -0,0 +1,233 @@
1
+ # Python (FastMCP) — Advanced Features & Quality Checklist
2
+
3
+ Continues `11-python-implementation.md`. Advanced FastMCP capabilities, Python-specific best practices, and the finalization checklist.
4
+
5
+ ## Advanced FastMCP Features
6
+
7
+ ### Context Parameter Injection
8
+
9
+ FastMCP can automatically inject a `Context` parameter into tools for advanced capabilities like logging, progress reporting, resource reading, and user interaction:
10
+
11
+ ```python
12
+ from mcp.server.fastmcp import FastMCP, Context
13
+
14
+ mcp = FastMCP("example_mcp")
15
+
16
+ @mcp.tool()
17
+ async def advanced_search(query: str, ctx: Context) -> str:
18
+ '''Advanced tool with context access for logging and progress.'''
19
+
20
+ # Report progress for long operations
21
+ await ctx.report_progress(0.25, "Starting search...")
22
+
23
+ # Log information for debugging
24
+ await ctx.log_info("Processing query", {"query": query, "timestamp": datetime.now()})
25
+
26
+ # Perform search
27
+ results = await search_api(query)
28
+ await ctx.report_progress(0.75, "Formatting results...")
29
+
30
+ # Access server configuration
31
+ server_name = ctx.fastmcp.name
32
+
33
+ return format_results(results)
34
+
35
+ @mcp.tool()
36
+ async def interactive_tool(resource_id: str, ctx: Context) -> str:
37
+ '''Tool that can request additional input from users.'''
38
+
39
+ # Request sensitive information when needed
40
+ api_key = await ctx.elicit(
41
+ prompt="Please provide your API key:",
42
+ input_type="password"
43
+ )
44
+
45
+ # Use the provided key
46
+ return await api_call(resource_id, api_key)
47
+ ```
48
+
49
+ **Context capabilities:**
50
+ - `ctx.report_progress(progress, message)` — Report progress for long operations
51
+ - `ctx.log_info(message, data)` / `ctx.log_error()` / `ctx.log_debug()` — Logging
52
+ - `ctx.elicit(prompt, input_type)` — Request input from users
53
+ - `ctx.fastmcp.name` — Access server configuration
54
+ - `ctx.read_resource(uri)` — Read MCP resources
55
+
56
+ ### Resource Registration
57
+
58
+ Expose data as resources for efficient, template-based access:
59
+
60
+ ```python
61
+ @mcp.resource("file://documents/{name}")
62
+ async def get_document(name: str) -> str:
63
+ '''Expose documents as MCP resources.
64
+
65
+ Resources are useful for static or semi-static data that doesn't
66
+ require complex parameters. They use URI templates for flexible access.
67
+ '''
68
+ document_path = f"./docs/{name}"
69
+ with open(document_path, "r") as f:
70
+ return f.read()
71
+
72
+ @mcp.resource("config://settings/{key}")
73
+ async def get_setting(key: str, ctx: Context) -> str:
74
+ '''Expose configuration as resources with context.'''
75
+ settings = await load_settings()
76
+ return json.dumps(settings.get(key, {}))
77
+ ```
78
+
79
+ **When to use Resources vs Tools:**
80
+ - **Resources:** for data access with simple parameters (URI templates)
81
+ - **Tools:** for complex operations with validation and business logic
82
+
83
+ ### Structured Output Types
84
+
85
+ FastMCP supports multiple return types beyond strings:
86
+
87
+ ```python
88
+ from typing import TypedDict
89
+ from dataclasses import dataclass
90
+ from pydantic import BaseModel
91
+
92
+ # TypedDict for structured returns
93
+ class UserData(TypedDict):
94
+ id: str
95
+ name: str
96
+ email: str
97
+
98
+ @mcp.tool()
99
+ async def get_user_typed(user_id: str) -> UserData:
100
+ '''Returns structured data - FastMCP handles serialization.'''
101
+ return {"id": user_id, "name": "John Doe", "email": "john@example.com"}
102
+
103
+ # Pydantic models for complex validation
104
+ class DetailedUser(BaseModel):
105
+ id: str
106
+ name: str
107
+ email: str
108
+ created_at: datetime
109
+ metadata: Dict[str, Any]
110
+
111
+ @mcp.tool()
112
+ async def get_user_detailed(user_id: str) -> DetailedUser:
113
+ '''Returns Pydantic model - automatically generates schema.'''
114
+ user = await fetch_user(user_id)
115
+ return DetailedUser(**user)
116
+ ```
117
+
118
+ ### Lifespan Management
119
+
120
+ Initialize resources that persist across requests:
121
+
122
+ ```python
123
+ from contextlib import asynccontextmanager
124
+
125
+ @asynccontextmanager
126
+ async def app_lifespan():
127
+ '''Manage resources that live for the server's lifetime.'''
128
+ # Initialize connections, load config, etc.
129
+ db = await connect_to_database()
130
+ config = load_configuration()
131
+
132
+ # Make available to all tools
133
+ yield {"db": db, "config": config}
134
+
135
+ # Cleanup on shutdown
136
+ await db.close()
137
+
138
+ mcp = FastMCP("example_mcp", lifespan=app_lifespan)
139
+
140
+ @mcp.tool()
141
+ async def query_data(query: str, ctx: Context) -> str:
142
+ '''Access lifespan resources through context.'''
143
+ db = ctx.request_context.lifespan_state["db"]
144
+ results = await db.query(query)
145
+ return format_results(results)
146
+ ```
147
+
148
+ ### Transport Options
149
+
150
+ FastMCP supports two main transport mechanisms:
151
+
152
+ ```python
153
+ # stdio transport (for local tools) - default
154
+ if __name__ == "__main__":
155
+ mcp.run()
156
+
157
+ # Streamable HTTP transport (for remote servers)
158
+ if __name__ == "__main__":
159
+ mcp.run(transport="streamable_http", port=8000)
160
+ ```
161
+
162
+ **Transport selection:**
163
+ - **stdio:** command-line tools, local integrations, subprocess execution
164
+ - **Streamable HTTP:** web services, remote access, multiple clients
165
+
166
+ ## Code Best Practices
167
+
168
+ ### Code Composability and Reusability
169
+
170
+ Prioritize composability and code reuse (the general rule is in `00-core.md`): extract common functionality into reusable helper functions, shared API clients, centralized error handling, composable business logic, and shared markdown/JSON field-selection & formatting. NEVER copy-paste similar code between tools; if you write similar logic twice, extract it. Share pagination, filtering, field selection, and formatting; centralize authentication/authorization.
171
+
172
+ ### Python-Specific Best Practices
173
+
174
+ 1. **Use Type Hints:** always include type annotations for function parameters and return values.
175
+ 2. **Pydantic Models:** define clear Pydantic models for all input validation.
176
+ 3. **Avoid Manual Validation:** let Pydantic handle input validation with constraints.
177
+ 4. **Proper Imports:** group imports (standard library, third-party, local).
178
+ 5. **Error Handling:** use specific exception types (`httpx.HTTPStatusError`, not generic `Exception`).
179
+ 6. **Async Context Managers:** use `async with` for resources that need cleanup.
180
+ 7. **Constants:** define module-level constants in UPPER_CASE.
181
+
182
+ ## Quality Checklist
183
+
184
+ Before finalizing your Python MCP server implementation, ensure:
185
+
186
+ ### Strategic Design
187
+ - [ ] Tools enable complete workflows, not just API endpoint wrappers
188
+ - [ ] Tool names reflect natural task subdivisions
189
+ - [ ] Response formats optimize for agent context efficiency
190
+ - [ ] Human-readable identifiers used where appropriate
191
+ - [ ] Error messages guide agents toward correct usage
192
+
193
+ ### Implementation Quality
194
+ - [ ] FOCUSED IMPLEMENTATION: Most important and valuable tools implemented
195
+ - [ ] All tools have descriptive names and documentation
196
+ - [ ] Return types are consistent across similar operations
197
+ - [ ] Error handling is implemented for all external calls
198
+ - [ ] Server name follows format: `{service}_mcp`
199
+ - [ ] All network operations use async/await
200
+ - [ ] Common functionality is extracted into reusable functions
201
+ - [ ] Error messages are clear, actionable, and educational
202
+ - [ ] Outputs are properly validated and formatted
203
+
204
+ ### Tool Configuration
205
+ - [ ] All tools implement 'name' and 'annotations' in the decorator
206
+ - [ ] Annotations correctly set (readOnlyHint, destructiveHint, idempotentHint, openWorldHint)
207
+ - [ ] All tools use Pydantic BaseModel for input validation with Field() definitions
208
+ - [ ] All Pydantic Fields have explicit types and descriptions with constraints
209
+ - [ ] All tools have comprehensive docstrings with explicit input/output types
210
+ - [ ] Docstrings include complete schema structure for dict/JSON returns
211
+ - [ ] Pydantic models handle input validation (no manual validation needed)
212
+
213
+ ### Advanced Features (where applicable)
214
+ - [ ] Context injection used for logging, progress, or elicitation
215
+ - [ ] Resources registered for appropriate data endpoints
216
+ - [ ] Lifespan management implemented for persistent connections
217
+ - [ ] Structured output types used (TypedDict, Pydantic models)
218
+ - [ ] Appropriate transport configured (stdio or streamable HTTP)
219
+
220
+ ### Code Quality
221
+ - [ ] File includes proper imports including Pydantic imports
222
+ - [ ] Pagination is properly implemented where applicable
223
+ - [ ] Filtering options are provided for potentially large result sets
224
+ - [ ] All async functions are properly defined with `async def`
225
+ - [ ] HTTP client usage follows async patterns with proper context managers
226
+ - [ ] Type hints are used throughout the code
227
+ - [ ] Constants are defined at module level in UPPER_CASE
228
+
229
+ ### Testing
230
+ - [ ] Server runs successfully: `python your_server.py --help`
231
+ - [ ] All imports resolve correctly
232
+ - [ ] Sample tool calls work as expected
233
+ - [ ] Error scenarios handled gracefully