BRIC-18: Add MCP tool docstring warnings and simplify publish_section_version#38
Conversation
…tion_version - Add IMPORTANT docstring warnings to all 3 MCP tools telling LLMs not to pass hallucinated parameters (limit, offset, etc.) - Simplify publish_section_version: remove section_key, workflow_id, workflow_name, workflow_metadata from public params (now hardcoded internally) to reduce LLM hallucination surface area - Add trailing newline
…nature - Remove section_key, workflow_id, workflow_name, workflow_metadata from test calls to match the new simplified signature - Assert hardcoded defaults are passed to use_case.execute
Code Review — PR #38📊 Score : 8/10✅ Points positifs1. Objectif clair et bien exécuté 2. Docstrings IMPORTANT bien pensées 3. Hardcoding au bon endroit 4. Tests bien mis à jour
|
Kaiohz
left a comment
There was a problem hiding this comment.
See inline comments for specific suggestions.
| workflow_metadata: dict | None = None, | ||
| content: dict | ||
| ) -> dict: | ||
| """Publie la réponse structurée d'une section d'un projet Bricks. |
There was a problem hiding this comment.
📌 Ce hardcoding est la bonne décision pour réduire la surface d'erreur LLM, mais un commentaire expliquant pourquoi serait utile pour les devs futurs :
# Hardcoded: MCP tool only publishes consolidated data sections.
# These params are internal implementation details, not caller-facing.| workflow_id: str = "agent-haiku-files-v1", | ||
| workflow_name: str = "agent-haiku-files-v1", | ||
| workflow_metadata: dict | None = None, | ||
| content: dict |
There was a problem hiding this comment.
💡 L'exemple (e.g., limit, offset, etc.) est générique. Pour ce tool spécifiquement, mentionner les params retirés serait plus précis pour le LLM :
IMPORTANT: This tool ONLY accepts project_unique_id and content.
Do NOT pass section_key, workflow_id, workflow_name, or workflow_metadata — they are handled internally and are not supported as parameters.
| await publish_section_version( | ||
| project_unique_id="proj-abc", | ||
| section_key="summary", | ||
| content="Summary content", |
There was a problem hiding this comment.
Le nom du test test_forward_all_params_to_use_case est devenu trompeur — il ne forward plus "all params" mais vérifie les defaults hardcodés. Suggestion : renommer en test_forward_params_with_hardcoded_defaults.
Jira
BRIC-18
Changes
Related: SoluDevTech/composable-agents#24