Skip to main content
Glama

stoneai — AI 自动化编程工具包 for CAREL STone

为卡乐(CAREL)STone 编程软件(c.suite 6.x / STone 1.8.x)提供的一套 不打开 IDE、不点鼠标的自动化编程能力。

AI 驱动 STone 的完整闭环

  • 通过 STone 官方自动化 API(SToneCLI iron-python)创建工程、注册源码、编译

  • 把编译器的诊断结果解析成结构化数据(文件 / 行 / 列 / 错误码 / 消息)

  • 提取符号表:POU、成员接口(输入/输出/局部变量及类型)、变量、任务

  • 生成可直接编译通过的 ST 骨架代码(PROGRAM / FUNCTION_BLOCK / 任务配置)

  • 内置 System. 库 API 知识库*(640 条真实签名)与 IDE 代码片段

  • 以 MCP server 形式暴露给 AI agent,实现"生成 → 编译 → 读错误 → 修复"闭环

纯工具层,不绕过授权:编译需要本机安装 STone 且持有有效许可证 (stoneai doctor 会实际编译一个临时工程来验证)。


实际运行效果

下面是大模型驱动整个流程的真实终端输出(不是示意图):

真实运行输出

编译失败时,AI 拿到的不是一坨文本日志,而是可以直接定位的结构化诊断:

结构化诊断


Related MCP server: STM32Cube-MCP

一键复现

不需要配 AI、不需要 MCP,直接跑这个脚本就能看到上面整套流程:

python examples/demo.py

它会依次完成:检索 API → 建工程 → 生成代码 → 编译 → 读符号表 → 故意写错 → 捕获诊断 → 自动修复 → 编译通过。约 50 秒。


安装

需要 Windows + Python 3.10+ + 已安装的 CAREL STone(默认路径或 STONEAI_CLI)。

cd C:\Users\liugu\Desktop\STone测试\stoneai
pip install -e .
stoneai doctor

doctor 输出类似:

SToneCLI      : C:\Program Files (x86)\CAREL\STone\SToneCLI.exe  [OK]
workroot      : C:\Users\liugu\.stoneai
System libs   : ...  [OK]
SToneAPI      : IronPython 3.4.2 [OK]
license/build : OK (dummy solution compiled)

十分钟上手

1. 建一个工程(中文路径没问题)

stoneai new D:\我的项目 ChillerMgmt

2. 让 AI 生成一个功能块并编译

from stoneai import api, stgen

sol = api.open_solution(r"D:\我的项目\ChillerMgmt\ChillerMgmt.stone")
prj = sol.project

fb = stgen.fan_block("FanCtrl1")           # 带滞回的两点控制骨架
prj.add_st_file("FanCtrl", fb.render())    # 写盘 + 注册 + 自动编译
rep = prj.build()
print(rep.summary())                       # BUILD OK

3. 出错了?拿到结构化诊断

rep = prj.build()
for e in rep.errors:
    print(e.code, e.message, e.file, e.line, e.col)
E0078 The name 'bBroken' could not be found ... C:\...\FanCtrl.st 17 11

4. 读符号表,知道工程里“现在有什么”

idx = prj.symbols()
idx.summary()                              # configuration=1, member=6, pou=2, ...
idx.pou_interfaces()["FanCtrl1"]
# {'inputs': ['rSetpoint','rActual'], 'outputs': ['bOut'],
#  'locals': ['rHysteresis','bEnable'],
#  'types': {'rSetpoint':'REAL', ...}}

5. 查 System 库 API

stoneai search alarm
stoneai snippet FOR

6. 团队协作:把改动推回仓库

stoneai ship "改了什么说明"

等价于 git add -A && git commit && git push,不用记 git 命令。 首次推送会弹出 GitHub 登录,勾选「记住凭据」后以后就免密了。


MCP server(给 AI agent 用)

{
  "mcpServers": {
    "stoneai": { "command": "python", "args": ["-m", "stoneai.mcp_server"] }
  }
}

stoneai mcp-config 会直接打印出本机可用的配置(command 用当前 Python 的 绝对路径),复制粘贴即可。

各客户端接入

Claude Code — ~/.claude.json 的 mcpServers:

{
  "mcpServers": {
    "stoneai": {
      "command": "C:\\Python314\\python.exe",
      "args": ["-m", "stoneai.mcp_server"],
      "env": { "PYTHONIOENCODING": "utf-8", "PYTHONUTF8": "1" }
    }
  }
}

Codex — ~/.codex/config.toml:

[mcp_servers.stoneai]
command = 'C:\Python314\python.exe'
args = ["-m", "stoneai.mcp_server"]
startup_timeout_sec = 120

[mcp_servers.stoneai.env]
PYTHONIOENCODING = "utf-8"
PYTHONUTF8 = "1"

DeepSeek Harness (DSH) — ~/.dsh/profiles/desktop/cordis.patch.yml。

⚠️ DSH 这层是按 id 覆盖已有行的语义,新增插件必须包在 insert: 里, 直接写 - id: mcp-stoneai 会因目标行不存在被静默跳过:

- insert:
    - id: mcp-stoneai
      name: "@deepseek-ai/dsh-mcp-client"
      config:
        serverName: stoneai
        transport: stdio
        command: 'C:\Python314\python.exe'
        args: [ "-m", "stoneai.mcp_server" ]
        env:
          PYTHONIOENCODING: utf-8
          PYTHONUTF8: "1"
        # STone 编译大工程可能几十秒,默认 60s 不够
        toolCallTimeoutMs: 300000
        # MCP 起不来也不阻断 harness 启动
        failOnStartupError: false

模型里看到的工具名是 mcp__stoneai__<工具名>。改完要完全退出并重开 DSH。

配置要点(三个客户端通用)

  • 用 Python 绝对路径,不要写 python —— 客户端启动子进程时不走你的 PATH

  • PYTHONIOENCODING=utf-8 —— 不设的话中文路径 / 中文输出可能乱码

  • 超时给足 —— STone 冷启动编译可能要几十秒,默认值常常不够

可用工具

工具

作用

stone_doctor

环境/许可证自检(真实编译一个临时工程)

stone_solution_create

由模板创建工程

stone_solution_state

列出项目 / 文件 / 配置

stone_files_add

写入并注册 .st 源码,同时编译

stone_build

编译,返回结构化错误 / 警告 + flash.bin 路径

stone_symbols

符号表(POU、成员接口、变量、任务),支持 query= 过滤

stone_api_search

搜索 System.* 库 API

stone_snippet

查看 IDE 自带 ST 代码片段

stone_pou_generate

生成可编译的 POU 骨架

stone_target_connect

连接目标 (TcpIp,10.10.9.128,4122)

stone_watch_read

从已连接目标读变量

典型 AI 闭环:stone_api_search 查 API → stone_pou_generate 出骨架 → 补上业务逻辑 → stone_files_add 编译 → stone_build 读错误 → 改 → 再编译。


工作原理(及踩过的坑)

  1. 一切走 SToneCLI.exe iron-python。STone 内嵌 IronPython 3.4, 注入 stone 全局对象(Solution / Target),提供 CreateNewSolution / AddFile / Build(返回 IResult)等 API。 这是官方自动化入口,不需要打开 IDE。

  2. 每次调用都是一个全新的 STone 进程,stone 对象不跨进程保持状态。 所以库的设计是“一次调用一个步骤序列(steps)”,在同一进程内开工程、 操作、保存。

  3. 命令行参数不能含中文。SToneCLI 会把 argv 里的非 ASCII 字符弄成 ????(连工作目录里的中文也一样),例如 C:\Users\liugu\Desktop\STone????。 所以所有路径只走 JSON 负载文件,脚本副本放在 ASCII 安全的 ~/.stoneai 下。工程本身放在任何中文路径里都正常。

  4. 写操作必须立即 Save。AddFile 只改内存,跨进程就会丢; stoneai 内部每次变更都在同一进程里 save_solution。

  5. AddFile 的目标参数是“文件夹”不是文件名,传文件名会静默失败; 新文件要先写到工程外的暂存目录再被“复制进来”。

  6. .stone / .stprj 是明文 XML(根节点 SToneSolution / SToneProject), 但本工具不手写它们——交给官方 API 生成,永远不会格式错。

  7. 编译产物在 Output/<资源>/<配置>/:compilation.xml(诊断 + 符号表, 是权威数据源)、varListInfo.xml(内存分配)、generation.xml、 flash.bin(目标固件包)。

  8. USING System; 需要工程引用 System 库。新建工程默认没有引用任何库, 生成器默认不输出 USING,保证开箱即编。 System.* 库 API(日志、报警、BACnet、定时器…)由 stoneai search 提供检索, 要在代码里调用它们,需给工程加库:prj.add_library(r"D:\libs\X.stlib"), 或直接打开客户的既有设备工程(自带库与目标平台)——这是做真实项目的推荐路径。

  9. 目标平台(target)与设备插件绑定:pCOProject 等模板需要对应插件, 本机只有 BaseProject / EmptyProject。stoneai doctor 会如实报告。

  10. IEC 各 VAR 节都由 END_VAR 结束(没有 END_VAR_INPUT), 这是官方库源码里的写法,也是 stgen 遵守的规则。


已知限制

  • 新建工程默认不带任何库:BaseProject 只支持纯 IEC 61131-3。 要调用 System.*(日志/报警/通讯/定时器…),用 prj.add_library("xxx.stlib") 加库,或直接打开既有设备工程 (stoneai state <工程.stone>)——真实项目推荐这么做。

  • 设备模板(pCOProject 等)需要插件,插件文件由各产品线提供。

  • 只处理源码与构建:UI 编辑器(画面 .stgui)、协议配置(.protocfg)、 翻译等不在本工具范围内。

  • 下载到实体机需要目标连接(stoneai connect / stoneai watch), 本工具暴露了 API 但没有自动安全护栏——下载前请人工确认现场安全。

  • 逻辑体由 AI 编写:stgen 只生成保证编译通过的骨架,控制逻辑是 agent 的职责。

  • 只在 Windows + STone 1.8.11 上验证过。

License

MIT。本项目独立开发,与 CAREL Industries S.p.A. 无隶属关系。 STone、CAREL 是其各自所有者的商标。

Available Tools

11 tools
stone_buildB

Compile a solution/project. Returns structured errors and warnings and the flash.bin artifact path when it succeeds.

ParametersJSON Schema
NameRequiredDescriptionDefault
projectNo
solutionNo

TDQS

B3.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden, and it does disclose output behavior: structured errors/warnings and a flash.bin artifact path on success. It says nothing about build duration, whether artifacts/side-effect files are written, or whether failures are returned as errors versus thrown.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences, the action front-loaded and the return contract second. Nothing is repeated from the schema or padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The return-value sentence is valuable given there is no output schema, but for a tool with two undocumented parameters and no annotations, the definition leaves the agent guessing about argument selection and preconditions.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Both parameters have 0% schema coverage, so the description must compensate and it does not. The slash in 'solution/project' hints that either may be supplied, but never clarifies whether they are alternatives, mutually exclusive, or whether one is required.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Compile a solution/project') plus what it returns, so the agent knows exactly what the operation is. Siblings (stone_doctor, stone_solution_state, stone_target_connect) are visibly unrelated, so differentiation is implicit rather than stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No when-to-use guidance, no prerequisites (e.g. must the target be connected first?), and no exclusions relative to stone_doctor or stone_solution_state. The agent must infer the workflow position of a build step.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

stone_doctorA

Check the STone environment: SToneCLI, IronPython API and whether a dummy solution compiles (valid license).

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must cover behavior entirely. It usefully discloses that the check compiles a dummy solution, implying it is more than a passive read and may take time or touch the filesystem. It does not cover whether anything is persisted, how long it takes, or what a pass or fail result means.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One sentence, front-loaded with the action, then the concrete checks. There is no filler, and the license-validation detail is attached to the check that proves it.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a zero-parameter diagnostic tool with no annotations and no output schema, so the description should say more about what the result consists of and how to act on a failure. It names the checks but leaves the output shape and failure semantics unexplained.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters, so the baseline is 4. The description correctly implies that no input is required, because the environment is probed directly.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Check') and resource ('STone environment') and enumerates the sub-checks: SToneCLI, IronPython API, and dummy-solution compilation for license validity. This clearly separates it from the sibling tools, which create, build, search, or generate; none of them diagnose the environment.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The diagnostic nature is implied by the name and the checklist enumeration, so an agent can infer it is a pre-flight or troubleshooting check. But there is no explicit statement of when to run it (before first build, after connection failures) or when another sibling is the better call.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

stone_files_addB

Write an .st source into a project, register it and compile. Returns build diagnostics (code, file, line, column).

ParametersJSON Schema
NameRequiredDescriptionDefault
codeNo
nameNo
projectNo
solutionNo

TDQS

B3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full behavioral burden. It mentions that compilation occurs and diagnostics are returned, but it does not disclose whether existing files are overwritten, what permissions are required, whether registration has side effects, or what happens on failure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences are front-loaded and free of waste. The core action and the return type are stated efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has four parameters with no schema descriptions, no annotations, and no output schema. The description mentions diagnostics with field names but does not explain parameter roles, write semantics, or the build side effects, leaving important gaps for an agent invoking it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description should compensate for the four undocumented parameters. It only loosely implies that code and project are involved, leaving name and solution unexplained and adding little beyond the parameter names.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource: writing an .st source into a project, registering it, and compiling it. It is clear what the tool does, though it does not explicitly distinguish itself from related siblings such as stone_build or stone_pou_generate.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the write-register-compile workflow, but the description does not state when to use this tool versus stone_build or other source-generation tools. There are no explicit prerequisites, exclusions, or alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

stone_pou_generateC

Generate a compiling PROGRAM/FUNCTION_BLOCK skeleton with typed variable sections; the body stays yours.

ParametersJSON Schema
NameRequiredDescriptionDefault
bodyNo
kindNo
nameNo
commentNo
variablesNo
return_typeNo

TDQS

C2.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and delivers little: it doesn't say whether the skeleton is returned as text or written to a project/file, whether anything is validated or compiled, or what 'compiling' guarantees. The 'body stays yours' clause does usefully disclose that no implementation logic is generated, but that is the only behavioral fact given.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler, which is good structurally. However, its brevity comes at the cost of under-specification rather than efficiency — the one clause present is doing work that several omitted clauses should do.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 6-parameter, zero-coverage, no-annotation, no-output-schema tool, the description leaves critical gaps: return format, whether files are created, and the meaning of most parameters. An agent could guess a call shape from the schema but cannot predict the result or side effects.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 6 parameters, so the description must compensate and largely doesn't. 'typed variable sections' hints at the variables array and 'body stays yours' hints that body is a pass-through, but kind, name, comment, and return_type are never explained, and accepted values for kind are unknown (no enum).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb+resource: 'Generate a compiling PROGRAM/FUNCTION_BLOCK skeleton with typed variable sections'. It names the exact artifacts (PROGRAM/FUNCTION_BLOCK) and the scope (skeleton only, body left to the caller), which no sibling tool covers. No sibling differentiation is stated, but the stone_* siblings are clearly unrelated toolchain utilities.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this versus writing code by hand or using stone_snippet/stone_solution_create, and no prerequisites or preconditions are mentioned. The only hint of scope is the trailing clause 'the body stays yours', which implies the tool won't supply logic.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

stone_snippetC

Show the IDE's own ST code snippets (exact statement spellings).

ParametersJSON Schema
NameRequiredDescriptionDefault
nameNo

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full disclosure burden. It implies a read-only lookup, but says nothing about whether omitting the name returns all snippets, how the name matches, or what the returned data looks like — leaving key behaviors for the agent to guess.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One short sentence, front-loaded with the core action and resource, with zero filler. It is efficient, but the brevity comes at the cost of the specification gaps noted elsewhere.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with an undocumented optional parameter, no annotations, and no output schema, the description is too thin: it does not explain what the parameter does or what the agent receives back, so an agent must call it speculatively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%: the single 'name' parameter is a bare string with no description. The tool description never mentions the parameter at all, so an agent cannot tell whether it is an exact snippet name, a substring filter, or a category.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description pairs a specific verb ('Show') with a specific resource ('the IDE's own ST code snippets') and clarifies the value proposition ('exact statement spellings'). That makes it distinguishable from lookup-oriented siblings like stone_api_search or stone_symbols, though it never explicitly contrasts with them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: the parenthetical 'exact statement spellings' hints the tool is for confirming precise ST syntax, but there is no statement of when to prefer it over stone_api_search or stone_symbols, nor any exclusion guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

stone_solution_createC

Create a new STone solution from a template (BaseProject, EmptyProject, ...). Returns the solution path.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameNo
base_dirNo
templateNo

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full behavioral burden. It discloses the return value ('solution path') but says nothing about permissions, overwrite behavior if the solution already exists, template validity, or side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single front-loaded sentence that states the core action and return value with no wasted text. Examples are included compactly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations, no output schema, and 0% schema description coverage, the description is too thin. It does not explain required versus optional parameters, directory behavior, or creation side effects.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% for all three parameters. The description only partially clarifies the 'template' parameter by naming examples ('BaseProject, EmptyProject, ...'), while 'name' and 'base_dir' remain undocumented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: create a new STone solution from a template. It is clear enough to distinguish this from state/build/file tools, but it does not explicitly compare itself to siblings such as stone_solution_state.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance about when to use this tool versus alternatives, nor any prerequisites or exclusions. Usage is only implied by the word 'Create'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

stone_solution_stateC

List projects, registered files and build configurations of a .stone solution.

ParametersJSON Schema
NameRequiredDescriptionDefault
solutionNo

TDQS

C2.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description carries the full burden. 'List' implies a non-destructive read, which is the only behavioral signal; nothing is said about whether the solution must exist on disk, what happens when the solution argument is omitted, or whether results are cached/stale.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with zero filler; nothing is buried or repeated. Brevity is efficient, though it edges toward under-specification rather than wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no annotations, no output schema, and an undocumented optional parameter, the description leaves key call-time questions unanswered: default solution resolution and the shape of the returned project/file/config listing. For an inspection tool that is the entry point to a workflow, more context is warranted.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and the single 'solution' parameter is undocumented and not required. The phrase 'of a .stone solution' hints that the parameter identifies the solution, but gives no format (path? name? .stone file extension?) or default behavior when omitted.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Uses a specific verb ('List') with three concrete resources (projects, registered files, build configurations) scoped to a .stone solution. That clearly separates it from mutating siblings like stone_solution_create and stone_files_add, though it never names an alternative explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no statement of when to call this versus stone_solution_create, stone_files_add, or stone_doctor, nor any prerequisite such as 'call after stone_solution_create'. The agent must infer from the name that this is the read/inspect step in the workflow.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

stone_symbolsC

Symbol index of the last build: POUs, their member interfaces (inputs/outputs/locals with types), variables, tasks, types. Optional: query=substring, interfaces=true.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryNo
projectNo
solutionNo
interfacesNo

TDQS

C2.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It does disclose one genuinely useful behavioral trait: the index reflects the *last build*, implying a build must have run, and that interfaces must be opted into. It says nothing about read-only semantics, what happens when no build exists, or result size/pagination.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two compact sentences with the returned content front-loaded and options deferred. The telegraphic phrasing ('types. Optional: query=substring') is efficient but verges on terse shorthand that could read ambiguously.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

A 4-parameter tool with zero annotation coverage and no output schema needs more: the format of the returned index, the meaning of project vs solution, and the build prerequisite are all unstated. The description names what is indexed but not enough for an agent to call it confidently in all cases.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate and only partly does. It clarifies that query is a substring match and that interfaces is a boolean toggle, but project and solution — half the parameters — are left entirely unexplained in both schema and description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific resource and scope: a symbol index of the last build, enumerating POUs, member interfaces with types, variables, tasks and types. An agent can tell this is a post-build symbol lookup rather than a build or state tool. The verb is implicit and no sibling is named, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No when-to-use guidance and no exclusions. It never contrasts itself with stone_api_search (searching API reference) or stone_solution_state (current solution state), which are the obvious alternatives an agent would weigh. The 'Optional:' line describes parameters, not usage conditions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

stone_target_connectC

Connect STone to a target, e.g. 'TcpIp,10.10.9.128,4122'.

ParametersJSON Schema
NameRequiredDescriptionDefault
solutionNo
connection_stringNo

TDQS

C2.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It says to connect but does not describe connection persistence, authentication, failure behavior, side effects, or what the tool returns.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single front-loaded sentence with no wasted words, and the example is useful. However, its brevity contributes to under-specification rather than crisp completeness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with two undocumented parameters, no annotations, and no output schema, the description is too thin. It does not explain the relationship between solution and connection_string or what an agent should expect after connecting.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must explain both parameters, but it only gives an example connection string without mapping it explicitly to the connection_string parameter. The solution parameter is left completely unexplained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (Connect) and resource (STone to a target), with an example connection string that clarifies the target format. It does not differentiate this tool from sibling stone_solution_state or other connection-related operations, but the core action is understandable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no guidance on when to use this tool versus alternatives, nor any prerequisites such as needing an existing solution or target availability. It only provides a bare example, leaving usage context to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

stone_watch_readC

Read one variable from the connected target.

ParametersJSON Schema
NameRequiredDescriptionDefault
solutionNo
variableNo

TDQS

C2.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full behavioral burden. It discloses that the operation reads a variable from a connected target, but does not describe permissions, return format, failure behavior, or whether the target must first be connected via stone_target_connect.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single front-loaded sentence with no wasted words. It is appropriately concise, though the brevity contributes to missing contextual detail elsewhere.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no annotations, no output schema, and 0% schema description coverage, the definition is too sparse for reliable invocation. It leaves the meaning of 'solution', requiredness of parameters, return value, and error behavior undocumented.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for both parameters. It mentions 'variable' but does not explain the 'solution' parameter, whether either parameter is required, or what format the variable identifier should take.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: read one variable from the connected target. It is clear and distinct from most siblings, but it does not explicitly differentiate itself from related tools such as stone_symbols or stone_solution_state.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The sentence implies a read operation against a connected target, but gives no explicit when-to-use guidance, prerequisites beyond 'connected target', or alternatives among sibling tools. It does not say when this tool should be selected over stone_symbols or stone_solution_state.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 11 tool updatesv0.1.0
    • First observedstone_api_search
    • First observedstone_build
    • First observedstone_doctor
    • First observedstone_files_add
    • First observedstone_pou_generate
    • First observedstone_snippet
    • First observedstone_solution_create
    • First observedstone_solution_state
    • First observedstone_symbols
    • First observedstone_target_connect
    • First observedstone_watch_read

TDQS

B3.2/5.0

Scored across 11 tools

Disambiguation4/5

Most tools target distinct resources/actions (doctor, create, state, build, symbols, connect, read). There is mild overlap: stone_files_add both writes a file and compiles while stone_build compiles, and stone_pou_generate also produces ST source; similarly stone_api_search vs stone_snippet are both reference lookups. Descriptions clarify the boundaries adequately.

Naming Consistency4/5

All tools share a 'stone_' snake_case prefix, making them clearly cohesive. However, the suffix pattern mixes noun-only labels (stone_doctor, stone_build, stone_symbols, stone_snippet) with verb_noun forms (stone_solution_create, stone_target_connect, stone_watch_read), a minor deviation.

Tool Count5/5

Eleven tools is well within the ideal 3-15 range. Each tool maps to a distinct step in the STone workflow (setup, create, build, inspect, generate, connect, monitor) and none feel redundant.

Completeness3/5

Core lifecycle is present (create solution, add files, build, inspect symbols, connect, read). But notable gaps exist: only stone_watch_read with no variable write, no target disconnect, and no file/project delete or update operations, which limits full PLC round-trip workflows.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    B
    maintenance
    Enables AI agents to discover, inspect, edit, rebuild, and save Schneider Electric RemoteConnect and SCADAPack x70 IEC logic projects, including program sections, hardware, variables, and Modbus configuration.
    63
    1
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    This server enables AI agents to fully control STM32CubeIDE and STMicroelectronics hardware, including GUI automation, headless builds, flashing, GDB debugging, option bytes, serial telemetry, and CubeMX .ioc engineering.
    34
    2
    Apache 2.0
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables AI assistants to automate CODESYS V3 PLC development, including project editing, builds, library and alarm management, online variable read/write/force operations, and CODESYS documentation search via MCP.
    2
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables AI coding agents and compatible clients to query real-time editor language-server diagnostics, type/symbol information, and code navigation without waiting for slow tsc/eslint checks, plus workspace-aware operations such as finding references, renaming symbols, opening files, and executing editor commands.
    MIT