diff options
| author | tanaka takashi <isazaka@gmail.com> | 2026-06-29 21:43:54 +0900 |
|---|---|---|
| committer | tanaka takashi <isazaka@gmail.com> | 2026-06-30 01:23:51 +0900 |
| commit | 4bc721c3bf7589b519c5730d093f704ce56e3f09 (patch) | |
| tree | 38da055ab15fd70f5c92584560ea73486e5ddce0 /src/mcp/tools/common/context.h | |
| parent | 4c6a831aa2a57e2bcc20aa3fc2f1b7172f5be285 (diff) | |
refactor: MCP層をmcpc APIベースに刷新
- 独自JSON-RPC処理をmcpcへ置き換え
- 各MCPツールを個別ソースへ分離
- 共通コンテキストと登録処理を整理
- mcpc互換修正と統合テストを更新
Diffstat (limited to 'src/mcp/tools/common/context.h')
| -rw-r--r-- | src/mcp/tools/common/context.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mcp/tools/common/context.h b/src/mcp/tools/common/context.h new file mode 100644 index 0000000..0847d4b --- /dev/null +++ b/src/mcp/tools/common/context.h @@ -0,0 +1,20 @@ +#ifndef TINY_CONVMEM_MCP_TOOLS_CONTEXT_H +#define TINY_CONVMEM_MCP_TOOLS_CONTEXT_H + +#include "domain/search.h" +#include "storage/store.h" + +typedef struct tiny_mcp_tools_context +{ + tiny_store_t *store; + tiny_search_index_t *search_index; +} tiny_mcp_tools_context_t; + +tiny_mcp_tools_context_t *tiny_mcp_tools_context_new(tiny_store_t *store); +void tiny_mcp_tools_context_free(tiny_mcp_tools_context_t *context); +bool tiny_mcp_tools_context_activate(tiny_mcp_tools_context_t *context); +void tiny_mcp_tools_context_deactivate(tiny_mcp_tools_context_t *context); +tiny_mcp_tools_context_t *tiny_mcp_tools_context_current(void); +tiny_search_index_t *tiny_mcp_tools_build_search_index(const tiny_store_t *store); + +#endif |
