owner-clone-ai-mcp 1.63.0 → 1.65.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -373,7 +373,9 @@ const handlers = {
373
373
  if (args.updated_before) params.set('updated_before', args.updated_before);
374
374
  if (args.include_subfolders === true) params.set('include_subfolders', 'true');
375
375
  const data = await callApi(`/knowledge?${params}`);
376
- if (!data.items || data.items.length === 0) return 'ナレッジが登録されていません。';
376
+ // 0件時にアカウント範囲を明示(BUG-20260807-01の教訓: 別アカウントのキーで一覧すると
377
+ // 実在するナレッジが「消えた」ように見える。一覧・検索は自分のナレッジのみが対象)
378
+ if (!data.items || data.items.length === 0) return '該当するナレッジがありません。※一覧・検索は「このMCPキーのアカウントが所有するナレッジ」のみが対象です。実在するはずのナレッジが見えない場合は、別アカウントのMCPキーを使っていないか確認してください(IDが分かる場合は get_knowledge_item で実在確認できます)。';
377
379
  // タグは一覧にも出す(APIは以前から返していたが表示していなかった)。
378
380
  const lines = data.items.map(item =>
379
381
  `- [${item.id}] ${item.title} (${item.category || 'その他'})${item.folder_path ? ` 保存場所: ${item.folder_path}` : ''} 作成: ${item.created_at?.slice(0, 10)} / 更新: ${item.updated_at?.slice(0, 10)}` +
@@ -0,0 +1,50 @@
1
+ 'use strict';
2
+
3
+ // Macbuil(自社MAツール)連携。macbuil_list_tools / macbuil_execute の2本。
4
+ // Owner Clone AI に登録済みの Macbuil APIキー(設定画面 → 外部連携 → Macbuil)を使ってサーバーが中継する。
5
+ // 個別操作の定義・操作ガイドはバックエンドが供給(OpenAPI由来)=バックエンドのデプロイのみで
6
+ // 操作の追加・説明の改善が全ユーザーに即反映される(このファイルの再配布は不要)。
7
+
8
+ const { callApi } = require('../lib/api');
9
+
10
+ const j = (x) => JSON.stringify(x, null, 1);
11
+ const post = (path, body) => callApi(path, { method: 'POST', body: JSON.stringify(body || {}) });
12
+
13
+ const tools = [
14
+ {
15
+ name: 'macbuil_list_tools',
16
+ description: 'Macbuil(MAツール: ファネル・ページ制作・メール・オファー・イベント・フォーム・会員サイト・オンラインコース)で利用可能な操作カタログを取得します。引数なし=カテゴリ別の操作一覧(名前+要約)と操作ガイド。tool_name指定=その操作の正確な引数定義(inputSchema)。macbuil_execute を使う前に必ず tool_name 指定で引数定義を確認してください。Owner Clone AI の設定画面で Macbuil APIキーを登録済みのユーザーのみ利用可能。',
17
+ annotations: { readOnlyHint: true },
18
+ inputSchema: {
19
+ type: 'object',
20
+ properties: {
21
+ tool_name: { type: 'string', description: '引数定義を確認したい操作名(カンマ区切りで複数可・省略時はカタログ全体)' },
22
+ },
23
+ },
24
+ },
25
+ {
26
+ name: 'macbuil_execute',
27
+ description: 'Macbuil の操作を実行します(ファネル・ページ・メール・オファー・イベント・フォーム・会員サイト・コースの取得・作成・更新)。作成・更新はドラフト基本。メール送信・公開系は本ツールでは実行できません。必ず先に macbuil_list_tools(tool_name指定)で正確な引数定義と操作ガイド(ページコンテンツ更新は GET→全体コピー→編集→PUT の規則等)を確認すること。【書き込み権限付きキーが必要】',
28
+ annotations: { destructiveHint: false },
29
+ inputSchema: {
30
+ type: 'object',
31
+ properties: {
32
+ tool_name: { type: 'string', description: 'Macbuil操作名(macbuil_list_tools で取得した正確な名前。例: macbuil_list_funnels)' },
33
+ arguments: { type: 'object', description: '操作の引数(_operation_guide の規則に従い、パスパラメータ・クエリ・ボディ項目を全てフラットに指定)' },
34
+ },
35
+ required: ['tool_name'],
36
+ },
37
+ },
38
+ ];
39
+
40
+ const handlers = {
41
+ async macbuil_list_tools(args) {
42
+ const q = args && args.tool_name ? `?name=${encodeURIComponent(args.tool_name)}` : '';
43
+ return j(await callApi(`/macbuil/tools${q}`));
44
+ },
45
+ async macbuil_execute(args) {
46
+ return j(await post('/macbuil/execute', { tool_name: args.tool_name, arguments: args.arguments || {} }));
47
+ },
48
+ };
49
+
50
+ module.exports = { tools, handlers };
package/domains/skills.js CHANGED
@@ -444,8 +444,9 @@ const handlers = {
444
444
  }).join('\n\n---\n\n');
445
445
  },
446
446
 
447
- get_skill: async ({ id }) => {
448
- const s = await callApi(`/skills/${id}`);
447
+ // BUG-20260811-01対策: 引数名を skill_id と誤って渡された場合も受理(idが正)
448
+ get_skill: async ({ id, skill_id }) => {
449
+ const s = await callApi(`/skills/${id || skill_id}`);
449
450
  const params = Array.isArray(s.parameters) ? s.parameters : [];
450
451
  const paramStr = params.length
451
452
  ? params.map(p => ` - ${p.name}${p.required ? '(必須)' : '(任意)'}: ${p.description || ''}${p.default_value ? ` [デフォルト: ${p.default_value}]` : ''}`).join('\n')
@@ -539,8 +540,9 @@ const handlers = {
539
540
  return `スキルを削除しました(ID: ${id})`;
540
541
  },
541
542
 
542
- prepare_skill: async ({ id, params = {}, version }) => {
543
- const ctx = await callApi(`/skills/${id}/prepare`, {
543
+ // BUG-20260811-01対策: 引数名を skill_id と誤って渡された場合も受理(idが正)
544
+ prepare_skill: async ({ id, skill_id, params = {}, version }) => {
545
+ const ctx = await callApi(`/skills/${id || skill_id}/prepare`, {
544
546
  method: 'POST',
545
547
  body: JSON.stringify({ params, version: version || undefined }),
546
548
  });
package/index.js CHANGED
@@ -23,8 +23,9 @@ const skills = require('./domains/skills');
23
23
  const analytics = require('./domains/analytics');
24
24
  const myasp = require('./domains/myasp');
25
25
  const wordpress = require('./domains/wordpress');
26
+ const macbuil = require('./domains/macbuil');
26
27
 
27
- const allDomains = [knowledge, agentPresets, workflows, chatbots, schedulesAndTasks, projects, brain, funnels, skills, analytics, myasp, wordpress];
28
+ const allDomains = [knowledge, agentPresets, workflows, chatbots, schedulesAndTasks, projects, brain, funnels, skills, analytics, myasp, wordpress, macbuil];
28
29
 
29
30
  const TOOLS = allDomains.flatMap(d => d.tools);
30
31
  const HANDLERS = Object.assign({}, ...allDomains.map(d => d.handlers));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "owner-clone-ai-mcp",
3
- "version": "1.63.0",
3
+ "version": "1.65.0",
4
4
  "description": "MCP server for Owner Clone AI — exposes knowledge and agent presets to Claude Code",
5
5
  "main": "index.js",
6
6
  "bin": {