diff --git a/functions/function_calling/my_tool.py b/functions/function_calling/my_tool.py new file mode 100644 index 00000000..635997ea --- /dev/null +++ b/functions/function_calling/my_tool.py @@ -0,0 +1,2 @@ +def hello(name: str) -> str: + return f"Hello {name}" \ No newline at end of file diff --git a/skills.md b/skills.md index f10435d4..982b16c4 100644 --- a/skills.md +++ b/skills.md @@ -157,40 +157,32 @@ Run ability units via the local API and return `final_message` from the JSON res http://127.0.0.1:6400/api/workflows/test.yaml/delete ``` +10) List local tools (function_calling) +- Method: GET +- URL: http://127.0.0.1:6400/api/tools/local +- Example: + ``` + curl --noproxy 127.0.0.1 -X GET http://127.0.0.1:6400/api/tools/local + ``` + ## Tools hot updates -Run the MCP server separately from the main backend. Use `cache_ttl: 0` in the -MCP tooling config to disable tool list caching. +Local function tools are managed via the same backend (port 6400). Endpoints: -- List tools: `GET http://127.0.0.1:8010/admin/tools/list` (returns `source` and `call_methods`) -- Upload tool: `POST http://127.0.0.1:8010/admin/tools/upload` -- Reload tools: `POST http://127.0.0.1:8010/admin/tools/reload` +- List local tools: `GET http://127.0.0.1:6400/api/tools/local` +- Create/overwrite local tool file: `POST http://127.0.0.1:6400/api/tools/local` -Wiring rules (from `source`): -- `local_tools`: can wire via `tooling.type: function` or `tooling.type: mcp_remote`. -- `mcp_tools`: wire via `tooling.type: mcp_remote` only. - -Upload example: +Create example: ``` -curl --noproxy 127.0.0.1 -v -X POST http://127.0.0.1:8010/admin/tools/upload \ +curl --noproxy 127.0.0.1 -X POST http://127.0.0.1:6400/api/tools/local \ -H "Content-Type: application/json" \ -d '{ - "filename": "test.py", + "filename": "add.py", "content": "def add(a: int, b: int) -> dict:\n return {\"result\": a + b}\n", - "functions": ["add"], - "replace": true + "overwrite": true }' ``` -YAML example (MCP): -``` -tooling: - - type: mcp_remote - config: - server: "http://127.0.0.1:8010/mcp" - cache_ttl: 0 -``` - YAML example (local function_calling): ``` tooling: @@ -403,4 +395,4 @@ graph: path: "yaml_instance/deep_research_v1.yaml" ``` - Ensure that all generated artifacts are output to your workspace file paths whenever possible -- Ensure that all agents’ roles are concise, sophisticated, and equipped with sufficient tools \ No newline at end of file +- Ensure that all agents’ roles are concise, sophisticated, and equipped with sufficient tools