Skip to main content
Glama

expert_model

Leverage specialized knowledge by connecting with experts through this tool. Input instructions to receive tailored solutions, track iterations, and enhance decision-making within a collaborative framework.

Instructions

Use this tool to communicate with an expert.

Args: name: The name of the expert to communicate with. Required. instructions: The instructions to send to the expert. Required. output: The answer from the expert based on the instructions. Required. iteration: The number of experts you have consulted so far. Start with 1.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instructionsYes
iterationYes
nameYes
outputYes

Implementation Reference

  • The handler function for the 'expert_model' tool. It takes expert name, instructions, previous output, and iteration count, then samples a response from the context using the instructions and appends a next_action prompt.
    @mcp.tool() async def expert_model( name: str, instructions: str, output: str, iteration: int, ctx: Context ) -> str: """ Use this tool to communicate with an expert. Args: name: The name of the expert to communicate with. Required. instructions: The instructions to send to the expert. Required. output: The answer from the expert based on the instructions. Required. iteration: The number of experts you have consulted so far. Start with 1. """ next_action = "Based on the information given, what are the most logical next steps or conclusions? Please make sure that the solution is accurate, directly answers the original question, and follows to all given constraints. Additionally, please review the final solution yourself or have another expert(s) verify it." try: output = await ctx.sample(instructions) return f"{output}\n\n{next_action}" except Exception: print("Client doesn't support sampling, using the output directly") return next_action
  • Registration of the 'expert_model' tool via the @mcp.tool() decorator.
    @mcp.tool()
  • Docstring defining the input schema/parameters for the expert_model tool.
    """ Use this tool to communicate with an expert. Args: name: The name of the expert to communicate with. Required. instructions: The instructions to send to the expert. Required. output: The answer from the expert based on the instructions. Required. iteration: The number of experts you have consulted so far. Start with 1. """

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tisu19021997/meta-prompt-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server