@ferscloud/fers-mcp 2.103.0 → 2.105.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.
- package/dist/fers-mcp.cjs +63 -15
- package/package.json +2 -2
package/dist/fers-mcp.cjs
CHANGED
|
@@ -21940,7 +21940,7 @@ var openapi_default = {
|
|
|
21940
21940
|
name: "PolyForm-Strict-1.0.0",
|
|
21941
21941
|
url: "https://polyformproject.org/licenses/strict/1.0.0"
|
|
21942
21942
|
},
|
|
21943
|
-
version: "0.2.
|
|
21943
|
+
version: "0.2.105"
|
|
21944
21944
|
},
|
|
21945
21945
|
paths: {},
|
|
21946
21946
|
components: {
|
|
@@ -22444,7 +22444,7 @@ var openapi_default = {
|
|
|
22444
22444
|
},
|
|
22445
22445
|
displacements: {
|
|
22446
22446
|
type: "object",
|
|
22447
|
-
description: "Buckling mode shape: per-node displacement pattern
|
|
22447
|
+
description: "Buckling mode shape: per-node displacement pattern, normalized so the\nlargest translational component is 1 model length unit (1 mm in a mm\nmodel); rotations in radians belong to that translation. Before 0.2.105\nthe rotations were those of a 1 m translation in every unit system.",
|
|
22448
22448
|
additionalProperties: {
|
|
22449
22449
|
$ref: "#/components/schemas/NodeDisplacement"
|
|
22450
22450
|
},
|
|
@@ -24965,7 +24965,7 @@ var openapi_default = {
|
|
|
24965
24965
|
},
|
|
24966
24966
|
ModalResults: {
|
|
24967
24967
|
type: "object",
|
|
24968
|
-
description: "Results of a modal (natural-frequency) analysis: the lowest natural modes of\nthe structure, sorted by ascending frequency.\n\
|
|
24968
|
+
description: "Results of a modal (natural-frequency) analysis: the lowest natural modes of\nthe structure, sorted by ascending frequency.\n\nThe scalar quantities are SI / time-based and therefore independent of the\nmodel's length and force units: frequencies in hertz, periods in seconds,\nmasses in kilograms. Mode shapes are in the model's length unit, normalized\nso the largest translational component is 1 (see\n[`ModeShape::displacements`]); the generalized mass and effective modal mass\nare reported separately for response-spectrum / participation work.",
|
|
24969
24969
|
required: [
|
|
24970
24970
|
"modes"
|
|
24971
24971
|
],
|
|
@@ -25007,7 +25007,7 @@ var openapi_default = {
|
|
|
25007
25007
|
},
|
|
25008
25008
|
displacements: {
|
|
25009
25009
|
type: "object",
|
|
25010
|
-
description: "Mode shape: per-node displacement pattern
|
|
25010
|
+
description: "Mode shape: per-node displacement pattern, normalized so the largest\ntranslational component is 1 model length unit (1 mm in a mm model);\nrotations in radians belong to that translation. Before 0.2.105 the\nrotations were those of a 1 m translation in every unit system.",
|
|
25011
25011
|
additionalProperties: {
|
|
25012
25012
|
$ref: "#/components/schemas/NodeDisplacement"
|
|
25013
25013
|
},
|
|
@@ -46043,7 +46043,7 @@ function analysisOptions(order = "LINEAR") {
|
|
|
46043
46043
|
include_shear_center_coupling: false
|
|
46044
46044
|
};
|
|
46045
46045
|
}
|
|
46046
|
-
var AUTO_ULS_FACTOR = 1.
|
|
46046
|
+
var AUTO_ULS_FACTOR = 1.5;
|
|
46047
46047
|
var XY_PLANE_COLUMN_ROTATION_DEG = 90;
|
|
46048
46048
|
function defaultCombinations(loadCaseIds = [1]) {
|
|
46049
46049
|
const factors = (factor) => loadCaseIds.map((load_case_id) => ({ load_case_id, factor }));
|
|
@@ -46327,6 +46327,7 @@ function buildFrame(p) {
|
|
|
46327
46327
|
}
|
|
46328
46328
|
};
|
|
46329
46329
|
}
|
|
46330
|
+
var CHECK_BEAM_ULS_FACTOR = AUTO_ULS_FACTOR;
|
|
46330
46331
|
function buildCheckBeam(p, resolve = getSteelSection) {
|
|
46331
46332
|
const geom = resolve(p.section);
|
|
46332
46333
|
if (!geom) {
|
|
@@ -46347,7 +46348,7 @@ function buildCheckBeam(p, resolve = getSteelSection) {
|
|
|
46347
46348
|
const L = p.span_m;
|
|
46348
46349
|
const support = p.support ?? "simply_supported";
|
|
46349
46350
|
const mat = p.material ?? "steel_S235";
|
|
46350
|
-
const uls = p.ulsFactor ??
|
|
46351
|
+
const uls = p.ulsFactor ?? CHECK_BEAM_ULS_FACTOR;
|
|
46351
46352
|
const section = namedSection(1, 1, p.section, geom);
|
|
46352
46353
|
const nodes = [
|
|
46353
46354
|
{ id: 1, X: 0, Y: 0, Z: 0, nodal_support: 1 },
|
|
@@ -83239,7 +83240,7 @@ PLANE. \`plane\` is "3D" (default) or "XY". "XY" requires every node to have Z =
|
|
|
83239
83240
|
|
|
83240
83241
|
SECTIONS. Give a library name ("IPE300", "HEA200", "CHS 114.3x5", "RHS 100x50x5", "UB 457x191x67", \u2026) in the member row and it is looked up and inserted with all EC3 moduli. For a rectangle or your own numbers, declare it in \`sections\` (same object shape as create_section) and reference it by name. A member naming no section gets the first declared section, else \`default_section\` (IPE300).
|
|
83241
83242
|
|
|
83242
|
-
LOADS are in kN, kN/m and kNm and are converted to newtons internally. \`loads\` is a list of load cases: {"name":"G","udl":[[member, w]],"nodal_loads":[[node, Fx, Fy, Fz]],"nodal_moments":[[node, Mx, My, Mz]],"point_loads":[[member, position0to1, Fx, Fy, Fz]]}. A 2-entry udl row [member, w] is w kN/m acting DOWN (\u2212Y); a 4-entry row [member, wx, wy, wz] is a full vector. Combine them with \`load_combinations\`: [{"name":"ULS","factors":{"G":1.35,"W":1.5}}], referencing load cases BY NAME; omit it for two automatic ones over every case: combination 1 "SLS characteristic (auto)" at factor 1.0 and combination 2 "ULS (auto)" at 1.
|
|
83243
|
+
LOADS are in kN, kN/m and kNm and are converted to newtons internally. \`loads\` is a list of load cases: {"name":"G","udl":[[member, w]],"nodal_loads":[[node, Fx, Fy, Fz]],"nodal_moments":[[node, Mx, My, Mz]],"point_loads":[[member, position0to1, Fx, Fy, Fz]]}. A 2-entry udl row [member, w] is w kN/m acting DOWN (\u2212Y); a 4-entry row [member, wx, wy, wz] is a full vector. Combine them with \`load_combinations\`: [{"name":"ULS","factors":{"G":1.35,"W":1.5}}], referencing load cases BY NAME; omit it for two automatic ones over every case: combination 1 "SLS characteristic (auto)" at factor 1.0 and combination 2 "ULS (auto)" at 1.5. A combination you name gets limit_state "ULS" unless you give one, because a null limit_state makes every later unity check silently evaluate nothing and report a pass.
|
|
83243
83244
|
|
|
83244
83245
|
LIMITS: ${FREE_MEMBER_LIMIT} members on the Free tier (hard "LimitExceeded" above that), so keep element counts modest.`;
|
|
83245
83246
|
var DOF_NAMES = ["X", "Y", "Z", "RX", "RY", "RZ"];
|
|
@@ -87092,6 +87093,7 @@ function solveInBrowserPayload(a) {
|
|
|
87092
87093
|
return {
|
|
87093
87094
|
status: "solve_in_browser",
|
|
87094
87095
|
open_url: a.openUrl,
|
|
87096
|
+
next_step: "Give the user open_url. When they have opened it (signed in to FERS as this account), call get_results with model_ref: it returns the numbers to this chat.",
|
|
87095
87097
|
expires_at: a.expiresAt.toISOString(),
|
|
87096
87098
|
model_ref: a.modelRef,
|
|
87097
87099
|
members: a.members,
|
|
@@ -87111,12 +87113,21 @@ function solveInBrowserPayload(a) {
|
|
|
87111
87113
|
in_chat_sandbox: sandboxRecipe(a),
|
|
87112
87114
|
local_server: LOCAL_SERVER_HINTS,
|
|
87113
87115
|
python: PYTHON_HINT,
|
|
87114
|
-
note: "This server does not run solves.
|
|
87116
|
+
note: "This server does not run solves. open_url solves the model in the user's browser and shows the results there, and get_results brings them back to this chat once the user has opened it. Without the link: solve in your code sandbox (in_chat_sandbox) or install the local FERS MCP server (local_server). The link lives as long as the draft: 24 hours, or until 50 newer drafts exist."
|
|
87115
87117
|
};
|
|
87116
87118
|
}
|
|
87117
87119
|
|
|
87120
|
+
// src/lib/agentLinkResults.ts
|
|
87121
|
+
var AGENT_RESULTS_MAX_BYTES = 200 * 1024;
|
|
87122
|
+
function shareSlugOf(urlOrSlug) {
|
|
87123
|
+
const m = /\/share\/([^/?#\s]+)/.exec(urlOrSlug);
|
|
87124
|
+
if (m) return decodeURIComponent(m[1]);
|
|
87125
|
+
return /^[A-Za-z0-9_-]{8,}$/.test(urlOrSlug) ? urlOrSlug : null;
|
|
87126
|
+
}
|
|
87127
|
+
|
|
87118
87128
|
// src/lib/mcp-core/server.ts
|
|
87119
|
-
var
|
|
87129
|
+
var isDraftRef = (x) => typeof x === "string" && x.startsWith("draft_");
|
|
87130
|
+
var SERVER_VERSION = "2.105.0";
|
|
87120
87131
|
function tooLarge(model) {
|
|
87121
87132
|
return typeof model !== "string" || model.length > MODEL_JSON_MAX_BYTES;
|
|
87122
87133
|
}
|
|
@@ -87221,6 +87232,12 @@ var TOOL_META = {
|
|
|
87221
87232
|
solve_model: { title: "Solve a structural model", readOnly: true },
|
|
87222
87233
|
run_unity_checks: { title: "Run code checks", readOnly: true },
|
|
87223
87234
|
check_beam: { title: "Check a steel beam (EN 1993-1-1)", readOnly: true },
|
|
87235
|
+
// Hosted only: what the user's browser computed for one of those links.
|
|
87236
|
+
get_results: {
|
|
87237
|
+
title: "Read results solved in the browser",
|
|
87238
|
+
readOnly: true,
|
|
87239
|
+
idempotent: true
|
|
87240
|
+
},
|
|
87224
87241
|
// Free, read-only inspection.
|
|
87225
87242
|
validate_model: {
|
|
87226
87243
|
title: "Validate a model",
|
|
@@ -87346,7 +87363,7 @@ var COMMON_SHEAR = 'SHEAR DEFORMATION is on for every section with a shear area
|
|
|
87346
87363
|
var COMMON_RESPONSE_SIZE = "KEEPING RESPONSES SMALL: solve_model defaults to detail:'standard'. Ask for detail:'summary' when you only need peak forces, displacements and reactions \u2014 a full solve on a real model can exceed a context window. Use stash_model to get a handle and pass model_ref instead of the whole document on every step.";
|
|
87347
87364
|
function instructionsFor(mode) {
|
|
87348
87365
|
if (mode === "hosted") {
|
|
87349
|
-
return COMMON_INTRO + "WHERE SOLVES RUN: this hosted server builds and validates models; it runs no solver. solve_model, run_unity_checks and check_beam return an open_url that solves the model in the user's browser: always give the user that link
|
|
87366
|
+
return COMMON_INTRO + "WHERE SOLVES RUN: this hosted server builds and validates models; it runs no solver. solve_model, run_unity_checks and check_beam return an open_url that solves the model in the user's browser: always give the user that link; once they open it, get_results(model_ref) returns the numbers. Else: the local server `npx -y @ferscloud/fers-mcp` or `pip install FERS`.\n\nFASTEST PATH for a steel member: check_beam builds the beam and its EN 1993-1-1 check in one call.\n\n" + COMMON_AUTHORING + `Units are the model's own (SI by default). Every tool here is free; the browser solve runs at the tier of the account that made the link, for that model only: Free (${FREE_TIER_USE}) up to ${FREE_MEMBER_LIMIT} members, Pro (${PRO_TIER_USE}) up to ${PRO_MEMBER_LIMIT}. If the user works for a business or a client, tell them the Free tier does not cover that.
|
|
87350
87367
|
|
|
87351
87368
|
` + COMMON_SHEAR + COMMON_RESPONSE_SIZE;
|
|
87352
87369
|
}
|
|
@@ -87387,7 +87404,7 @@ function createFersMcpServer(ctx, deps) {
|
|
|
87387
87404
|
cb
|
|
87388
87405
|
);
|
|
87389
87406
|
};
|
|
87390
|
-
const solveNote = hosted ? "On this hosted server the solve does NOT run here: the tool validates the model, parks it and returns an open_url that solves it in the user's browser, where the results are shown.
|
|
87407
|
+
const solveNote = hosted ? "On this hosted server the solve does NOT run here: the tool validates the model, parks it and returns an open_url that solves it in the user's browser, where the results are shown. Give the user the link; after they open it, get_results with the model_ref returns the numbers here." : "Runs on this machine; nothing is metered.";
|
|
87391
87408
|
const preflight = (modelJson) => {
|
|
87392
87409
|
const report = validateModelDeep(modelJson);
|
|
87393
87410
|
if (!report.valid) {
|
|
@@ -87595,7 +87612,7 @@ function createFersMcpServer(ctx, deps) {
|
|
|
87595
87612
|
"Point-load position along the span, 0..1 (default mid-span; tip for a cantilever)"
|
|
87596
87613
|
),
|
|
87597
87614
|
uls_factor: looseNumber().describe(
|
|
87598
|
-
"ULS load factor applied to the load (default 1.35)"
|
|
87615
|
+
"ULS load factor applied to the load (default 1.5, the imposed-load factor of EN 1990; pass 1.35 for a permanent load)"
|
|
87599
87616
|
),
|
|
87600
87617
|
restrained: looseBoolean().describe(
|
|
87601
87618
|
"true if the compression flange is continuously laterally restrained (e.g. by decking or a slab) \u2014 the LTB (\xA76.3.2) check is then skipped. Default false."
|
|
@@ -87683,7 +87700,7 @@ function createFersMcpServer(ctx, deps) {
|
|
|
87683
87700
|
);
|
|
87684
87701
|
defineTool(
|
|
87685
87702
|
"create_beam",
|
|
87686
|
-
"Generate a solver-ready FERS model JSON for one beam. Use a named library section (IPE300, HEA200, 'RHS 100x50x5', 'UB 457x191x67', 'W10X22', \u2026) or a solid rectangle. Returns model JSON to pass to solve_model. Accepts common parameter aliases (span/length for span_m, load/udl/uniform_load for load_kn; point_load implies load_type 'point'). Units: metres, kN, kN/m. The model carries two load combinations: 1 'SLS characteristic (auto)' at factor 1.0 and 2 'ULS (auto)' at 1.
|
|
87703
|
+
"Generate a solver-ready FERS model JSON for one beam. Use a named library section (IPE300, HEA200, 'RHS 100x50x5', 'UB 457x191x67', 'W10X22', \u2026) or a solid rectangle. Returns model JSON to pass to solve_model. Accepts common parameter aliases (span/length for span_m, load/udl/uniform_load for load_kn; point_load implies load_type 'point'). Units: metres, kN, kN/m. The model carries two load combinations: 1 'SLS characteristic (auto)' at factor 1.0 and 2 'ULS (auto)' at 1.5, so ULS unity checks evaluate factored loads. Shear deformation is included, so a deflection comes out a little above 5wL\u2074/384EI (set_analysis turns it off). Free.",
|
|
87687
87704
|
{
|
|
87688
87705
|
span_m: looseNumber().describe(
|
|
87689
87706
|
"Beam span in metres (required \u2014 or use alias `span`/`length`)"
|
|
@@ -87784,7 +87801,7 @@ function createFersMcpServer(ctx, deps) {
|
|
|
87784
87801
|
);
|
|
87785
87802
|
defineTool(
|
|
87786
87803
|
"create_frame",
|
|
87787
|
-
"Generate a solver-ready FERS model JSON for a 2-D rectangular portal frame (columns + beams). Returns model JSON to pass to solve_model. Units: metres, kN, kN/m. Columns are turned 90\xB0 so their depth (column_height_mm) resists sway in the frame plane. Load combinations as create_beam: 1 'SLS characteristic (auto)' at 1.0, 2 'ULS (auto)' at 1.
|
|
87804
|
+
"Generate a solver-ready FERS model JSON for a 2-D rectangular portal frame (columns + beams). Returns model JSON to pass to solve_model. Units: metres, kN, kN/m. Columns are turned 90\xB0 so their depth (column_height_mm) resists sway in the frame plane. Load combinations as create_beam: 1 'SLS characteristic (auto)' at 1.0, 2 'ULS (auto)' at 1.5. Free.",
|
|
87788
87805
|
{
|
|
87789
87806
|
bays: external_exports.coerce.number().optional().describe("Number of bays (default 1)"),
|
|
87790
87807
|
storeys: external_exports.coerce.number().optional().describe("Number of storeys (default 1)"),
|
|
@@ -88111,7 +88128,7 @@ function createFersMcpServer(ctx, deps) {
|
|
|
88111
88128
|
'JSON array of load cases in kN / kN\xB7m: [{"name":"G","udl":[[member, w]],"nodal_loads":[[node,Fx,Fy,Fz]],"nodal_moments":[[node,Mx,My,Mz]],"point_loads":[[member,pos0to1,Fx,Fy,Fz]]}]. A 2-entry udl row is kN/m acting DOWN.'
|
|
88112
88129
|
),
|
|
88113
88130
|
load_combinations: jsonString().optional().describe(
|
|
88114
|
-
'JSON array referencing load cases by NAME: [{"name":"ULS","factors":{"G":1.35,"W":1.5},"limit_state":"ULS"}]. Omit for two automatic ones over every case: 1 "SLS characteristic (auto)" at 1.0 and 2 "ULS (auto)" at 1.
|
|
88131
|
+
'JSON array referencing load cases by NAME: [{"name":"ULS","factors":{"G":1.35,"W":1.5},"limit_state":"ULS"}]. Omit for two automatic ones over every case: 1 "SLS characteristic (auto)" at 1.0 and 2 "ULS (auto)" at 1.5.'
|
|
88115
88132
|
),
|
|
88116
88133
|
self_weight: looseBoolean().describe(
|
|
88117
88134
|
"Add self-weight as its own load case and factor it into the combinations."
|
|
@@ -88730,6 +88747,37 @@ function createFersMcpServer(ctx, deps) {
|
|
|
88730
88747
|
async () => mkJson(await deps.account.usage())
|
|
88731
88748
|
);
|
|
88732
88749
|
}
|
|
88750
|
+
const browserResults = deps.drafts.browserResults;
|
|
88751
|
+
if (browserResults) {
|
|
88752
|
+
defineTool(
|
|
88753
|
+
"get_results",
|
|
88754
|
+
"Read the results of a model the user solved in their browser: pass the model_ref (or the open_url) that solve_model, run_unity_checks or check_beam returned. Ready once the user has opened the link while signed in to FERS as this account; until then it answers waiting. Returns each code check's utilization, pass/fail and governing rule, and the peak displacements, member forces and reactions per load case and combination, in the model's units.",
|
|
88755
|
+
{
|
|
88756
|
+
model_ref: external_exports.string().optional().describe("The model_ref a solve tool returned"),
|
|
88757
|
+
open_url: external_exports.string().optional().describe("Or the open_url it returned")
|
|
88758
|
+
},
|
|
88759
|
+
async (args) => {
|
|
88760
|
+
const ref = isDraftRef(args.model_ref) ? args.model_ref : void 0;
|
|
88761
|
+
const slug = !ref && args.open_url ? shareSlugOf(args.open_url) ?? void 0 : void 0;
|
|
88762
|
+
const outcome = await browserResults(userId, { ref, slug });
|
|
88763
|
+
if (outcome.status === "not_found") return mkError(outcome.error);
|
|
88764
|
+
if (outcome.status === "waiting") {
|
|
88765
|
+
return mkJson({
|
|
88766
|
+
status: "waiting",
|
|
88767
|
+
open_url: outcome.open_url,
|
|
88768
|
+
message: "Not solved yet: the user has not opened the link, or opened it without being signed in to FERS as this account. Ask them to open open_url; the page sends the results here once it has solved. Then call get_results again."
|
|
88769
|
+
});
|
|
88770
|
+
}
|
|
88771
|
+
return mkJson({
|
|
88772
|
+
status: "ready",
|
|
88773
|
+
solved_at: outcome.solved_at,
|
|
88774
|
+
open_url: outcome.open_url,
|
|
88775
|
+
results: outcome.results,
|
|
88776
|
+
note: "Solved in the user's browser by the FERS engine. Values are in the model's units (results.units). A check whose passes is null was not decided: never report it as a pass."
|
|
88777
|
+
});
|
|
88778
|
+
}
|
|
88779
|
+
);
|
|
88780
|
+
}
|
|
88733
88781
|
const jsonResource = (uri, data) => ({
|
|
88734
88782
|
contents: [
|
|
88735
88783
|
{ uri, mimeType: "application/json", text: JSON.stringify(data) }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ferscloud/fers-mcp",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.105.0",
|
|
4
4
|
"description": "FERS structural finite-element tools for MCP clients (Claude Desktop, Claude Code, Cursor, VS Code, Codex, ChatGPT desktop), solving on your own machine.",
|
|
5
5
|
"mcpName": "com.ferscloud/fers",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -30,6 +30,6 @@
|
|
|
30
30
|
"node": ">=18"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@ferscloud/fers-calculation": "0.2.
|
|
33
|
+
"@ferscloud/fers-calculation": "0.2.105"
|
|
34
34
|
}
|
|
35
35
|
}
|