#ifndef DIDACTYL_TOOLS_H
#define DIDACTYL_TOOLS_H

#include "../config.h"

struct trigger_manager;

typedef struct {
    didactyl_config_t* cfg;
    struct trigger_manager* trigger_manager;
    int template_sender_tier;
    const char* template_current_user_message;
    const char* template_trigger_event_json;
    const char* (*template_skill_lookup)(void* user_data, const char* d_tag);
    void* template_skill_lookup_user_data;
} tools_context_t;

int tools_init(tools_context_t* ctx, didactyl_config_t* cfg);
void tools_cleanup(tools_context_t* ctx);
char* tools_build_openai_schema_json(const tools_context_t* ctx);
char* tools_execute(tools_context_t* ctx, const char* tool_name, const char* args_json);

#endif