mcp: the probe tool takes at, points whose nearest nodes are probed (#105)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
This commit is contained in:
jyvikoandClaude Opus 5.5 authored and Irakli Kourtis committed 2026-10-15 11:07:46 -04:00
1 parent 5aace9b5b3
commit 92b6225a72
3 files changed
+20 -3

No files matched your search

+16
View File
@@ -224,6 +224,22 @@ fn screenshot_takes_a_camera_orientation() {
assert_eq!(again, turned);
}
/// `probe {at}` reads a structural result at the nodes nearest to points (#105); hostile points
/// are refused without a panic.
#[test]
fn probe_takes_points_at() {
let mut s = server();
ok(&mut s, "execute", json!({"command": "file.sample", "params": {"name": "cantilever"}}));
ok(&mut s, "solve", json!({"analysis": "static", "step": "Load"}));
let r = ok(&mut s, "probe", json!({"step": "Load", "at": [[0, 0, 0]]}));
let node = &r["nodes"][0];
assert!(node["xyz"].is_array() && node["distance"].is_number(), "{r}");
for at in [json!([[1e308, "x"]]), json!(vec![json!([0, 0, 0]); 20_000])] {
let (text, err) = call(&mut s, "probe", json!({"step": "Load", "at": at}));
assert!(err && text.len() < 100_000, "{text}");
}
}
#[test]
fn a_batch_stops_at_the_first_error() {
let mut s = server();