get_strategy
Retrieve a random creative prompt from Brian Eno's Oblique Strategies deck to overcome creative blocks and stimulate lateral thinking.
Instructions
Get a random oblique strategy from the specified edition.
Args: edition: The edition to use (edition-1, edition-2, edition-3, edition-4, condensed, programmers, do-it). Defaults to edition-2.
Returns: A dictionary containing the strategy text and edition information.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| edition | No |
Implementation Reference
- The actual implementation of the strategy retrieval logic.
def get_random_strategy( self, edition: Optional[str] = None ) -> Dict[str, Union[str, int]]: """Get a random strategy from the specified edition.""" if edition is None: edition = self.DEFAULT_EDITION try: strategies = self.load_strategies(edition) if not strategies: return { "error": f"No strategies found in edition: {edition}", "edition": edition, } strategy = random.choice(strategies) return { "strategy": strategy, "edition": edition, "total_in_edition": len(strategies), } except FileNotFoundError as e: return {"error": str(e), "edition": edition} except Exception as e: return {"error": f"An error occurred: {str(e)}", "edition": edition} - oblique_strategies_mcp/__main__.py:20-32 (registration)The registration of the 'get_strategy' tool using the FastMCP decorator, which delegates to the StrategiesManager.
@mcp.tool() def get_strategy(edition: Optional[str] = None) -> Dict[str, Union[str, int]]: """ Get a random oblique strategy from the specified edition. Args: edition: The edition to use (edition-1, edition-2, edition-3, edition-4, condensed, programmers, do-it). Defaults to edition-2. Returns: A dictionary containing the strategy text and edition information. """ return manager.get_random_strategy(edition)