-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathDatabaseToolInterface.php
More file actions
46 lines (41 loc) · 1.04 KB
/
DatabaseToolInterface.php
File metadata and controls
46 lines (41 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
declare(strict_types=1);
namespace Genaker\MagentoMcpAi\Api;
/**
* Database Tool Interface
*
* Implement this interface to create custom database tools that can be used
* by the LlmAnalyzer CLI command (`genaker:agento:llm`) via tool calling.
*
* @api
*/
interface DatabaseToolInterface
{
/**
* Get tool name (must be unique)
*
* @return string
*/
public function getName(): string;
/**
* Get tool description for AI
*
* @return string
*/
public function getDescription(): string;
/**
* Get tool parameters schema (OpenAPI-style JSON schema)
*
* @return array
*/
public function getParametersSchema(): array;
/**
* Execute the tool
*
* @param array $arguments Tool arguments
* @param bool $allowDangerous Whether dangerous operations are allowed
* @return array Result array with 'success', 'data', 'preview', etc.
* @throws \Exception
*/
public function execute(array $arguments, bool $allowDangerous = false): array;
}