Goal: Given a path to a convex directory, create an MCP server in Python with well defined tools.
Create a Planning Task
- Add fetch action with source=filepath, method=convex_mcp_spec.
- Add Propose plan action with a system message and optional context_reformatter_fn (str->str).
- Add revise plan with max revisions
All action configuration should be allowed to be declared at runtime using a RunnableConfig
Define the new fetch method in the below clause:
case PlanActionType.FETCH:
source = action_args['source']
method = action_args['method']
logging.info(f'Fetched data from {source}.')
match method:
case 'get_email_content':
result_string = 'This is an example email. Assign a task to Himanshu to review the updated docs.'
case _:
result_string = f'TODO: Implement method: {method}.'
return {'success': True, 'data': result_string, 'error': None}
Adjust the below fns:
- Functions
start_action, execute_action, handle_action_result in handle_action.py
- Function
handle_user_message in handle_user_input.py
- Function
set_propose_plan_args in action_utils.py
Goal: Given a path to a convex directory, create an MCP server in Python with well defined tools.
Create a Planning Task
All action configuration should be allowed to be declared at runtime using a
RunnableConfigDefine the new fetch method in the below clause:
Adjust the below fns:
start_action,execute_action,handle_action_resultinhandle_action.pyhandle_user_messageinhandle_user_input.pyset_propose_plan_argsinaction_utils.py