@uwa4d/openapi-mcp 0.2.0-beta.5 → 0.2.0-beta.7

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.
@@ -0,0 +1,338 @@
1
+ {
2
+ "generatedAt": "2026-08-07T02:47:15.585Z",
3
+ "keys": [
4
+ "Active_Dynamic_Bodies_Count_max",
5
+ "Active_Kinematic_Bodies_Count_max",
6
+ "AnimationClip_cnt_max",
7
+ "AnimationClip_mem_max_mb",
8
+ "AnimationUpdate_cpu_avg_ms",
9
+ "Animation_grpcpu_avg_ms",
10
+ "AnimatorInitialize_cpu_avg_ms",
11
+ "AnimatorInitialize_jank_rate",
12
+ "Animator_cnt_max",
13
+ "Animator_mem_max_mb",
14
+ "AnimatorsUpdate_cpu_avg_ms",
15
+ "AnimatorsWriteJob_cpu_avg_ms",
16
+ "Application.backgroundLoadingPriority",
17
+ "AssetBundle_Disk_mem_max_mb",
18
+ "AssetBundle_Memory_mem_max_mb",
19
+ "AssetBundle_cnt_max",
20
+ "AssetBundle_mem_max_mb",
21
+ "Asset_Count_max",
22
+ "Asset_total_cnt_max",
23
+ "Asset_total_mem_max_mb",
24
+ "AudioClip_cnt_max",
25
+ "AudioClip_mem_max_mb",
26
+ "Batch_cpu_cnt_max",
27
+ "Batches_Count_max",
28
+ "CameraImageEffects_cpu_avg_ms",
29
+ "CameraRender_cpu_avg_ms",
30
+ "CanvasBuildBatch_cpu_avg_ms",
31
+ "CanvasRenderSubBatch_cnt_max",
32
+ "CanvasRendererSyncTransform_cnt_max",
33
+ "CanvasSendWillRenderCanvases_cpu_avg_ms",
34
+ "CollectGarbageIncremental_cpu_avg_ms",
35
+ "Culling_cpu_avg_ms",
36
+ "Draw_Calls_Count_max",
37
+ "Dynamic_Bodies_2D_Count_max",
38
+ "FAsyncLoadingThread_cpu_avg_ms",
39
+ "FDrawSceneCommand_cpu_avg_ms",
40
+ "FTickFunctionTask_cpu_avg_ms",
41
+ "FTimerManager_cpu_avg_ms",
42
+ "Font_cnt_max",
43
+ "Font_mem_max_mb",
44
+ "GCCollect_jank_rate",
45
+ "GameThread_cpu_avg_ms",
46
+ "Game_Object_Count_max",
47
+ "GarbageCollectAssetsProfile_jank_rate",
48
+ "Instantiate_jank_rate",
49
+ "Kinematic_Bodies_2D_Count_max",
50
+ "LoadingReadObjectThreaded_jank_rate",
51
+ "LoadingReadObject_jank_rate",
52
+ "LoadingUpdatePreloading_cpu_avg_ms",
53
+ "Loading_grpcpu_avg_ms",
54
+ "Material_cnt_max",
55
+ "Material_mem_max_mb",
56
+ "MeshSkinningUpdate_cpu_avg_ms",
57
+ "Mesh_cnt_max",
58
+ "Mesh_mem_max_mb",
59
+ "Native_HeapTotal_mem_max_mb",
60
+ "Object_Count_max",
61
+ "OnDemandRendering_RenderFrameInterval_Count",
62
+ "Overlap_Queries_2D_Count_max",
63
+ "Overlaps_Count_max",
64
+ "ParticleSystemDraw_cnt_max",
65
+ "ParticleSystemUpdate_cpu_avg_ms",
66
+ "ParticleSystem_cnt_max",
67
+ "ParticleSystem_grpcpu_avg_ms",
68
+ "ParticleSystem_mem_max_mb",
69
+ "PhysicsFetchResults_cpu_avg_ms",
70
+ "PhysicsProcessReports_cpu_avg_ms",
71
+ "PhysicsProcessReports_jank_rate",
72
+ "PhysicsProcessing_cpu_avg_ms",
73
+ "PhysicsSimulate_cpu_avg_ms",
74
+ "Physics_grpcpu_avg_ms",
75
+ "RHIThread_cpu_avg_ms",
76
+ "RenderOpaqueGeometry_cpu_avg_ms",
77
+ "RenderPipelineManagerDoRenderLoop_Internal_cpu_avg_ms",
78
+ "RenderTexture_cnt_max",
79
+ "RenderTexture_mem_max_mb",
80
+ "RenderThread_cpu_avg_ms",
81
+ "RenderTransparentGeometry_cpu_avg_ms",
82
+ "RenderingEmitWorldScreenspaceCameraGeometry_cpu_avg_ms",
83
+ "Rendering_grpcpu_avg_ms",
84
+ "ResourcesUnloadUnusedAssets_cpu_avg_ms",
85
+ "STAT_AI_Overall_cpu_avg_ms",
86
+ "STAT_AddViewDependentWholeSceneShadowsForView_cpu_avg_ms",
87
+ "STAT_AnimGameThreadTime_cpu_avg_ms",
88
+ "STAT_AnimTickTime_cpu_avg_ms",
89
+ "STAT_AnimTriggerAnimNotifies_cpu_avg_ms",
90
+ "STAT_AnisotropyPassDrawTime_cpu_avg_ms",
91
+ "STAT_AssetRegistryLLM_max",
92
+ "STAT_AsyncLoadingLLM_max",
93
+ "STAT_BasePassDrawTime_cpu_avg_ms",
94
+ "STAT_BeginOcclusionTestsTime_cpu_avg_ms",
95
+ "STAT_BlendInPhysics_cpu_avg_ms",
96
+ "STAT_BlueprintTime_cpu_avg_ms",
97
+ "STAT_BuildCSMVisibilityState_cpu_avg_ms",
98
+ "STAT_CLMM_Occlusion_cpu_avg_ms",
99
+ "STAT_CLMM_Opaque_cpu_avg_ms",
100
+ "STAT_CLMM_Post_cpu_avg_ms",
101
+ "STAT_CLMM_Shadows_cpu_avg_ms",
102
+ "STAT_CLMM_Translucency_cpu_avg_ms",
103
+ "STAT_CSMStaticMeshReceivers_cnt_max",
104
+ "STAT_CSMSubjects_cnt_max",
105
+ "STAT_CacheUniformExpressions_cpu_avg_ms",
106
+ "STAT_CharFindFloor_cpu_avg_ms",
107
+ "STAT_CharHandleImpact_cpu_avg_ms",
108
+ "STAT_CharMoveUpdateDelegate_cpu_avg_ms",
109
+ "STAT_CharPhysFalling_cpu_avg_ms",
110
+ "STAT_CharPhysNavWalking_cpu_avg_ms",
111
+ "STAT_CharPhysWalking_cpu_avg_ms",
112
+ "STAT_CharacterMovementNonSimulated_cpu_avg_ms",
113
+ "STAT_CharacterMovementSimulated_cpu_avg_ms",
114
+ "STAT_CharacterMovementSmoothClientPosition_Interp_cpu_avg_ms",
115
+ "STAT_CharacterMovementSmoothClientPosition_Visual_cpu_avg_ms",
116
+ "STAT_CharacterMovementSmoothClientPosition_cpu_avg_ms",
117
+ "STAT_CharacterMovementTick_cpu_avg_ms",
118
+ "STAT_CharacterMovement_cpu_avg_ms",
119
+ "STAT_CollectGarbageInternalCall_ncall_max",
120
+ "STAT_CollectGarbageInternal_cpu_avg_ms",
121
+ "STAT_CollectGarbageInternal_cpu_max_ms",
122
+ "STAT_Collision_SceneQueryTotal_cpu_avg_ms",
123
+ "STAT_ComputeViewRelevance_cpu_avg_ms",
124
+ "STAT_CreateLumenRayTracingPipeline_cpu_avg_ms",
125
+ "STAT_CreateRayTracingPipeline_cpu_avg_ms",
126
+ "STAT_CreateWholeSceneProjectedShadow_cpu_avg_ms",
127
+ "STAT_DecalsDrawTime_cpu_avg_ms",
128
+ "STAT_DecompressPrecomputedOcclusion_cpu_avg_ms",
129
+ "STAT_DepthDrawTime_cpu_avg_ms",
130
+ "STAT_DestroyActor_cpu_avg_ms",
131
+ "STAT_DynamicEmitterCount_cnt_max",
132
+ "STAT_DynamicPSysCompCount_cnt_max",
133
+ "STAT_DynamicPSysCompCount_ncall_max",
134
+ "STAT_DynamicPrimitiveDrawTime_cpu_avg_ms",
135
+ "STAT_DynamicShadowSetupTime_cpu_avg_ms",
136
+ "STAT_EngineInitLLM_max",
137
+ "STAT_EngineMiscLLM_max",
138
+ "STAT_EnginePreInitLLM_max",
139
+ "STAT_ExplicitWaitRHIThread_cpu_avg_ms",
140
+ "STAT_FAsyncPackage_TickAsyncLoadingGameThread_cpu_avg_ms",
141
+ "STAT_FAsyncPackage_TickAsyncLoadingGameThread_cpu_max_ms",
142
+ "STAT_FEngineLoop_Tick_SlateInput_cpu_avg_ms",
143
+ "STAT_FNameLLM_max",
144
+ "STAT_FileSystemLLM_max",
145
+ "STAT_FinalizeAnimationUpdate_cpu_avg_ms",
146
+ "STAT_FinishRenderViewTargetTime_cpu_avg_ms",
147
+ "STAT_FrameSyncTime_cpu_avg_ms",
148
+ "STAT_GCLLM_max",
149
+ "STAT_GatherShadowPrimitivesTime_cpu_avg_ms",
150
+ "STAT_GetDynamicMeshElements_cpu_avg_ms",
151
+ "STAT_InitDynamicShadowsTime_cpu_avg_ms",
152
+ "STAT_InitProjectedShadowVisibility_cpu_avg_ms",
153
+ "STAT_InitViewsTime_cpu_avg_ms",
154
+ "STAT_InterpolateVolumetricLightmapOnCPU_cpu_avg_ms",
155
+ "STAT_LightingDrawTime_cpu_avg_ms",
156
+ "STAT_LocalizationLLM_max",
157
+ "STAT_MaterialsLLM_max",
158
+ "STAT_MeshDrawCalls_cnt_max",
159
+ "STAT_MeshObjectUpdate_cpu_avg_ms",
160
+ "STAT_Montage_Advance_cpu_avg_ms",
161
+ "STAT_NavWorldTickTime_cpu_avg_ms",
162
+ "STAT_NetReceiveRPC_cpu_avg_ms",
163
+ "STAT_NetWorldTickTime_cpu_avg_ms",
164
+ "STAT_NiagaraLLM_max",
165
+ "STAT_NiagaraNumSprites_cnt_max",
166
+ "STAT_NiagaraOverview_GT_cpu_avg_ms",
167
+ "STAT_NiagaraOverview_RT_cpu_avg_ms",
168
+ "STAT_NiagaraRenderSprites_ncall_max",
169
+ "STAT_OcclusionCull_cpu_avg_ms",
170
+ "STAT_OcclusionQueries_cnt_max",
171
+ "STAT_OpenGLShaderCompileTime_cpu_avg_ms",
172
+ "STAT_OpenGLShaderLinkTime_cpu_avg_ms",
173
+ "STAT_OpenGLShaderLinkTime_cpu_max_ms",
174
+ "STAT_ParticleDrawCalls_cnt_max",
175
+ "STAT_ParticlesLLM_max",
176
+ "STAT_ParticlesOverview_GT_cpu_avg_ms",
177
+ "STAT_ParticlesOverview_RT_cpu_avg_ms",
178
+ "STAT_PlatformTotalLLM_max",
179
+ "STAT_PlatformTrackedTotalLLM_max",
180
+ "STAT_PostAnimEvaluation_cpu_avg_ms",
181
+ "STAT_PresentTime_cpu_avg_ms",
182
+ "STAT_ProcessMouseButtonDown_cpu_avg_ms",
183
+ "STAT_ProcessMouseButtonUp_cpu_avg_ms",
184
+ "STAT_ProcessMouseMove_cpu_avg_ms",
185
+ "STAT_ProcessedPrimitives_cnt_max",
186
+ "STAT_ProgramSizeLLM_max",
187
+ "STAT_ProjectedShadowDrawTime_cpu_avg_ms",
188
+ "STAT_RHIDrawPrimitiveCalls_cnt_max",
189
+ "STAT_RHIMiscLLM_max",
190
+ "STAT_RHIThreadExecute_cpu_avg_ms",
191
+ "STAT_RHITriangles_cnt_max",
192
+ "STAT_RayTracingActiveInstances_cnt_max",
193
+ "STAT_RayTracingTotalInstances_cnt_max",
194
+ "STAT_RayTracing_FinishGatherInstances_cpu_avg_ms",
195
+ "STAT_ReflectiveShadowMapDrawTime_cpu_avg_ms",
196
+ "STAT_RefreshBoneTransforms_cpu_avg_ms",
197
+ "STAT_RenderQueryResultTime_cpu_avg_ms",
198
+ "STAT_RenderVelocities_cpu_avg_ms",
199
+ "STAT_ResourcesSumLLM_max",
200
+ "STAT_SceneDecals_cnt_max",
201
+ "STAT_SceneLights_cnt_max",
202
+ "STAT_SetupInteractionShadows_cpu_avg_ms",
203
+ "STAT_SetupMeshPass_cpu_avg_ms",
204
+ "STAT_ShadersLLM_max",
205
+ "STAT_Shaders_RTShaderLoadTime_cpu_avg_ms",
206
+ "STAT_Shaders_RTShaderLoadTime_cpu_max_ms",
207
+ "STAT_SkeletalMeshLLM_max",
208
+ "STAT_SlateApplicationInput_cpu_avg_ms",
209
+ "STAT_SlateDrawWindowTime_cpu_avg_ms",
210
+ "STAT_SlateElements_cnt_max",
211
+ "STAT_SlateMessageTick_cpu_avg_ms",
212
+ "STAT_SlateNumBatches_cnt_max",
213
+ "STAT_SlateNumPaintedWidgets_cnt_max",
214
+ "STAT_SlatePostProcessingRTTime_cpu_avg_ms",
215
+ "STAT_SlatePreFullBufferRTTime_cpu_avg_ms",
216
+ "STAT_SlatePreTickEvent_cpu_avg_ms",
217
+ "STAT_SlateRTDrawBatches_cpu_avg_ms",
218
+ "STAT_SlateRenderingRTTime_cpu_avg_ms",
219
+ "STAT_SlateTickTime_cpu_avg_ms",
220
+ "STAT_SlateTotalWidgets_cnt_max",
221
+ "STAT_SlateUpdateBufferRTTime_cpu_avg_ms",
222
+ "STAT_SlateVertexCount_cnt_max",
223
+ "STAT_SortStaticDrawLists_cpu_avg_ms",
224
+ "STAT_SpawnActorTime_cpu_avg_ms",
225
+ "STAT_SpawnActorTime_cpu_max_ms",
226
+ "STAT_StaticDrawListDrawTime_cpu_avg_ms",
227
+ "STAT_StaticMeshLLM_max",
228
+ "STAT_StaticRelevance_cpu_avg_ms",
229
+ "STAT_StatsLLM_max",
230
+ "STAT_TextureMetaDataLLM_max",
231
+ "STAT_ThreadStackLLM_max",
232
+ "STAT_TickableGameObjectsTime_cpu_avg_ms",
233
+ "STAT_TotalGPUFrameTime_cpu_avg_ms",
234
+ "STAT_TotalLLM_max",
235
+ "STAT_TotalPhysicsTime_cpu_avg_ms",
236
+ "STAT_TotalSceneRenderingTime_cpu_avg_ms",
237
+ "STAT_TranslucencyDrawTime_cpu_avg_ms",
238
+ "STAT_UILLM_max",
239
+ "STAT_UnitFrame_cpu_avg_ms",
240
+ "STAT_UnitGPU_cpu_avg_ms",
241
+ "STAT_UnitGame_cpu_avg_ms",
242
+ "STAT_UnitRHIT_cpu_avg_ms",
243
+ "STAT_UnitRender_cpu_avg_ms",
244
+ "STAT_UntaggedTotalLLM_max",
245
+ "STAT_UpdateAlwaysVisible_cpu_avg_ms",
246
+ "STAT_UpdateAnimation_cpu_avg_ms",
247
+ "STAT_UpdateIndirectLightingCache_cpu_avg_ms",
248
+ "STAT_UpdateOverlaps_cpu_avg_ms",
249
+ "STAT_UpdatePreshadowCache_cpu_avg_ms",
250
+ "STAT_UpdatePrimitiveFading_cpu_avg_ms",
251
+ "STAT_UpdateRBBones_cpu_avg_ms",
252
+ "STAT_UpdateStaticMeshesTime_cpu_avg_ms",
253
+ "STAT_ViewRelevance_cpu_avg_ms",
254
+ "STAT_ViewVisibilityTime_cpu_avg_ms",
255
+ "STAT_VisibleDynamicPrimitives_cnt_max",
256
+ "STAT_VisibleRayTracingPrimitives_cnt_max",
257
+ "STAT_VisibleStaticMeshElements_cnt_max",
258
+ "STAT_VulkanQueuePresent_cpu_avg_ms",
259
+ "STAT_WaterPassDrawTime_cpu_avg_ms",
260
+ "STAT_eglSwapBuffers_cpu_avg_ms",
261
+ "Scene_Object_Count_max",
262
+ "Screen_Resolution_Height_Count",
263
+ "Screen_Resolution_Width_Count",
264
+ "Scripting_grpcpu_avg_ms",
265
+ "ShaderCreateGPUProgram_jank_rate",
266
+ "ShaderParse_jank_rate",
267
+ "Shader_cnt_max",
268
+ "Shader_mem_max_mb",
269
+ "SkelMeshObjectUpdateDataCommand_cpu_avg_ms",
270
+ "SlateDrawWindowsCommand_cpu_avg_ms",
271
+ "StageEngineLateUpdate_cpu_avg_ms",
272
+ "Stat_ChannelReceivedRawBunchCall_ncall_max",
273
+ "Stat_ChannelReceivedRawBunch_ncall_max",
274
+ "Static_Colliders_Count_max",
275
+ "Static_Shapes_2D_Count_max",
276
+ "TextAsset_cnt_max",
277
+ "TextAsset_mem_max_mb",
278
+ "Texture_cnt_max",
279
+ "Texture_mem_max_mb",
280
+ "Triangles_Count_max",
281
+ "UIPanelLateUpdate_cpu_avg_ms",
282
+ "UIRectUpdate_cpu_avg_ms",
283
+ "Wasm_HeapTotal_mem_max_mb",
284
+ "Wwise_Reserved_mem_max_mb",
285
+ "android_memory_pss@max",
286
+ "batterylevel@mean_delta_p10000",
287
+ "batterypower_max",
288
+ "batterypower_mean",
289
+ "big_jank_rate",
290
+ "cpu_freq_x@mean",
291
+ "drawcall_cnt_max",
292
+ "fps_avg",
293
+ "frametime@gt_40_pct",
294
+ "gpu_counter_bandwidth_total_avg",
295
+ "gpu_counter_bandwidth_total_in_seconds_avg",
296
+ "gpu_counter_bus_utilization",
297
+ "gpu_counter_clocks",
298
+ "gpu_counter_cycles_per_pixel",
299
+ "gpu_counter_fragment",
300
+ "gpu_counter_fragment_shaded_avg",
301
+ "gpu_counter_gpu_temperature_max",
302
+ "gpu_counter_nobaselevel_texture_avg",
303
+ "gpu_counter_overdraw_avg",
304
+ "gpu_counter_primitive_avg",
305
+ "gpu_counter_read_stall_avg",
306
+ "gpu_counter_shader_cycles_avg",
307
+ "gpu_counter_shader_instructions_avg",
308
+ "gpu_counter_texture_cache_miss_l1_avg",
309
+ "gpu_target_freq_usage_120_fps_pct",
310
+ "gpu_target_freq_usage_30_fps_pct",
311
+ "gpu_target_freq_usage_45_fps_pct",
312
+ "gpu_target_freq_usage_60_fps_pct",
313
+ "gpu_time_avg_ms",
314
+ "ios_memory_footprint@max",
315
+ "jank_rate",
316
+ "jank_time_rate",
317
+ "lua_function_cnt_max",
318
+ "lua_mem_max_mb",
319
+ "lua_table_cnt_max",
320
+ "lua_userdata_cnt_max",
321
+ "monoObjectRef_cnt_max",
322
+ "network_in@max",
323
+ "network_out@max",
324
+ "power_max",
325
+ "reservedMono_mem_max_mb",
326
+ "reservedTotal_mem_max_mb",
327
+ "soc_ddr_freq",
328
+ "soc_gpu_freq",
329
+ "soc_gpu_loading",
330
+ "soc_gpu_utilization",
331
+ "temperature_max",
332
+ "temperature_mean",
333
+ "triangle_cnt_max",
334
+ "ui_cpu_avg_ms",
335
+ "usedSystem_mem_max_mb",
336
+ "windows_memory_workingset@max"
337
+ ]
338
+ }
package/dist/tools.d.ts CHANGED
@@ -28,6 +28,10 @@ export interface ToolResult {
28
28
  * 帧号范围和步长,并在点数对不上时给出警告,从结构上消除歧义。
29
29
  */
30
30
  export declare function annotateCurveAxes(data: unknown): unknown;
31
+ /**
32
+ * 自定义面板 statistic/curve 返回空 `{}` 时,优先提示面板名传错(静默失败高发)。
33
+ */
34
+ export declare function annotateDashboardEmptyResult(op: Operation, data: unknown, args: Record<string, unknown>): unknown;
31
35
  /**
32
36
  * 报告列表接口一次返回、按项目组分组。但上游会把同一份报告挂到每个项目组下
33
37
  * (沙箱实测多组两两交集 100%),直接按组统计会成倍放大。
package/dist/tools.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import { UwaApiError } from './client.js';
3
3
  import { INDICATOR_DASHBOARD_PANEL_GUIDE, versionGuideFor } from './version-guide.js';
4
+ import { findUnknownIndicatorDashboards, INDICATOR_DASHBOARD_KEYS, INDICATOR_DASHBOARD_NEGATIVE_EXAMPLES, } from './indicator-dashboard-keys.js';
4
5
  const ENGINE_LABEL = { unity: 'Unity', unreal: 'UE' };
5
6
  /**
6
7
  * 预签名数据默认完整返回,不按条数截断——实测各接口解压后在 10 KB ~ 500 KB 之间,
@@ -90,10 +91,13 @@ export function buildInputSchema(op) {
90
91
  for (const p of [...op.query, ...op.body]) {
91
92
  let desc = p.description;
92
93
  if (p.name === 'indicatorDashboards') {
94
+ const sampleKeys = ['fps_avg', 'drawcall_cnt_max', 'frametime@gt_40_pct', 'temperature_max'];
93
95
  desc = [
94
96
  desc,
95
97
  '传参名为面板标识符:后缀 _max/_avg 等为历史命名,不表示只能取峰值或均值。',
96
- '例:temperature_max 可拿到整机/CPU/GPU/电池温度的曲线及 mean/max/min 统计(见映射表子指标 key)。',
98
+ `合法取值共 ${INDICATOR_DASHBOARD_KEYS.length} 个;可先调 gotonline_overview_indicator_dashboard_keys 拉全量列表。`,
99
+ `常见误传(非面板名):${INDICATOR_DASHBOARD_NEGATIVE_EXAMPLES.join('、')}。`,
100
+ `示例面板名:${sampleKeys.join('、')}。`,
97
101
  ].join(' ');
98
102
  }
99
103
  const base = zodFor(p).describe(p.example ? `${desc}(示例:${p.example})` : desc);
@@ -258,6 +262,38 @@ export function annotateCurveAxes(data) {
258
262
  _axisHint: '每条曲线按 _axisBinding[曲线名].xAxisSource 指定的横轴取值,不要统一使用外层 x_axis',
259
263
  };
260
264
  }
265
+ /**
266
+ * 自定义面板 statistic/curve 返回空 `{}` 时,优先提示面板名传错(静默失败高发)。
267
+ */
268
+ export function annotateDashboardEmptyResult(op, data, args) {
269
+ const isDashboard = op.path.includes('/indicator/statistic/dashboard') ||
270
+ op.path.includes('/indicator/curve/dashboard') ||
271
+ op.path.includes('/custom/dashboard');
272
+ if (!isDashboard || !isObj(data))
273
+ return data;
274
+ const requested = args['indicatorDashboards'];
275
+ const stat = data['statistic'];
276
+ const columns = data['columns'];
277
+ const emptyStat = stat == null || (isObj(stat) && Object.keys(stat).length === 0);
278
+ const emptyColumns = !Array.isArray(columns) || columns.length === 0;
279
+ if (!emptyStat && !emptyColumns)
280
+ return data;
281
+ const unknown = findUnknownIndicatorDashboards(requested);
282
+ const hintParts = [
283
+ 'indicatorDashboards 可能传错,导致 statistic/columns 为空。',
284
+ '面板传参名≠统计维度后缀(如 fps_mean、frametime_min 是返回字段,不是面板名)。',
285
+ '合法示例:fps_avg、drawcall_cnt_max、frametime@gt_40_pct(含 @ 等特殊字符)。',
286
+ `误传示例:${INDICATOR_DASHBOARD_NEGATIVE_EXAMPLES.join('、')}。`,
287
+ '请先调 gotonline_overview_indicator_dashboard_keys 核对全量合法面板名。',
288
+ ];
289
+ if (unknown.length) {
290
+ hintParts.unshift(`未识别的面板名:${unknown.join('、')}。`);
291
+ }
292
+ return {
293
+ ...data,
294
+ _hint: hintParts.join(' '),
295
+ };
296
+ }
261
297
  const RECORD_ARRAY_KEYS = /^gotOnline.*Records$/;
262
298
  /**
263
299
  * 报告列表接口一次返回、按项目组分组。但上游会把同一份报告挂到每个项目组下
@@ -371,7 +407,26 @@ export function makeHandler(op, client, defaultMaxRows, maxChars) {
371
407
  body[p.name] = args[p.name];
372
408
  }
373
409
  const raw = await client.call(op.method, op.path, apiVersion, query, body);
374
- const data = annotateProjectGroups(annotateCurveAxes(raw));
410
+ const unknownDashboards = findUnknownIndicatorDashboards(args['indicatorDashboards']);
411
+ if (unknownDashboards.length) {
412
+ return {
413
+ content: [
414
+ {
415
+ type: 'text',
416
+ text: asText({
417
+ error: 'PARAMETERS_WRONG',
418
+ message: `indicatorDashboards 含未知面板名:${unknownDashboards.join('、')}`,
419
+ _hint: `这些是面板标识符,不是统计维度后缀。` +
420
+ `误传示例:${INDICATOR_DASHBOARD_NEGATIVE_EXAMPLES.join('、')};` +
421
+ `合法示例:fps_avg、frametime@gt_40_pct。` +
422
+ `请调 gotonline_overview_indicator_dashboard_keys 获取全量 ${INDICATOR_DASHBOARD_KEYS.length} 个合法值。`,
423
+ }),
424
+ },
425
+ ],
426
+ isError: true,
427
+ };
428
+ }
429
+ const data = annotateDashboardEmptyResult(op, annotateProjectGroups(annotateCurveAxes(raw)), args);
375
430
  const presignUrl = op.returnsPresignUrl && data && typeof data === 'object'
376
431
  ? data['dataPresignUrl']
377
432
  : undefined;
@@ -15,6 +15,8 @@ export const INDICATOR_DASHBOARD_PANEL_GUIDE = [
15
15
  ' · 曲线接口(indicator_curve / custom_dashboard)→ 各子指标逐帧曲线;',
16
16
  ' · 统计 2.0(indicator_statistic_dashboard)→ statistic 下 *_mean / *_maximum / *_min 及 scene_* 等全量统计。',
17
17
  '- 查温度曲线/均值/峰值:Unity Overview 且 SDK ≥ 2.5.1 时传 indicatorDashboards=temperature_max,再读 y_axis 或 statistic;勿仅看 get_overview_statistic 的汇总段。',
18
+ '- 合法面板名先调 gotonline_overview_indicator_dashboard_keys;勿传 fps_mean、frametime_min 等统计字段名。',
19
+ '- 误传示例:fps_mean、frametime_gt_40_pct(缺 @)、frametime_min;合法示例:fps_avg、frametime@gt_40_pct。',
18
20
  '- UE Overview 当前 Open API 未开放 custom/indicator dashboard 路径(会 24052),UE 温度汇总见 get_ue_overview_statistic_v2 的 temperature 段。',
19
21
  ].join('\n');
20
22
  /** 写入工具 description 的「选用规则」块,key 为 operation id。 */
@@ -59,6 +61,7 @@ export const VERSION_GUIDE = {
59
61
  '- 自定义面板统计 2.0。需 SDK ≥ 2.5.1,支持 GPU 指标,最多 15 个面板。',
60
62
  '- 旧接口(抽帧、无 GPU)见 gotonline_overview_custom_dashboard。',
61
63
  '- 只要逐帧曲线不要统计值时用 gotonline_overview_indicator_curve_dashboard。',
64
+ '- 返回 statistic 为空时优先怀疑 indicatorDashboards 传错;响应可能含 _hint。',
62
65
  INDICATOR_DASHBOARD_PANEL_GUIDE,
63
66
  ].join('\n'),
64
67
  gotonline_overview_indicator_curve_dashboard: [
@@ -105,6 +108,37 @@ export const VERSION_GUIDE = {
105
108
  '- 自定义函数组统计(Unity SDK ≥ 2.5.1;UE 提交日 > 2026-03-25,且 api 版本须 v1.0.2)。',
106
109
  '- UE 旧报告请用 gotonline_overview_group_export。',
107
110
  ].join('\n'),
111
+ gotonline_overview_method_idmap_statistic: [
112
+ '【选用规则——务必先看】',
113
+ '- **仅 Overview 报告**;返回 id_map 全部函数的统计(不去重、不过滤)。',
114
+ '- stackTestMode(Overview 堆栈采集模式)决定哪些字段有值:',
115
+ ' · CPU_ONLY:selfTimeMean / totalTimeMean / callCountTotal',
116
+ ' · LUA_MEM_ONLY:callCountTotal / selfMemoryMean / selfMemoryTotal',
117
+ ' · CPU_AND_LUA_MEM:以上全部;UE 固定 CPU_ONLY',
118
+ '- Unity:dataKey/recordId;UE:另传 threadName(如 GameThread)。Header v1.0.2。',
119
+ '- 复合工具 top_functions(Overview)会读 stackTestMode 并校验 metric;Mono 报告不走此规则。',
120
+ ].join('\n'),
121
+ gotonline_overview_method_curve: [
122
+ '【选用规则——务必先看】',
123
+ '- v1.0.1 直出曲线 JSON(按 stackMethodName 或 stackMethodId)。',
124
+ '- **MCP 与 Open API 推荐改用 gotonline_overview_method_curve_presign(v1.0.2)**:OSS 预签名,仅传 stackMethodId。',
125
+ '- stackMethodId 来自 gotonline_overview_method_idmap_statistic 或自定义函数组统计。',
126
+ ].join('\n'),
127
+ gotonline_overview_method_curve_presign: [
128
+ '【选用规则——务必先看】',
129
+ '- v1.0.2 OSS 预签名下载函数逐帧曲线 JSON(Unity · UE)。',
130
+ '- **Open API 入口仅支持 stackMethodId(必填)**;UE 另需 threadName。',
131
+ '- 不要用 v1.0.1 gotonline_overview_method_curve 除非必须服务端直出。',
132
+ '- stackMethodId 优先从 gotonline_overview_method_idmap_statistic 获取。',
133
+ ].join('\n'),
134
+ gotonline_overview_indicator_dashboard_keys: [
135
+ '【选用规则——务必先看】',
136
+ '- 返回 Overview 指标面板传参名称全量列表(indicatorDashboards 合法取值)。',
137
+ '- 无需 dataKey/recordId;与 statistic/curve dashboard 调用前校验同源。',
138
+ '- 勿把 fps_mean、frametime_min 等 statistic 内字段名当作面板名。',
139
+ '- 合法示例:fps_avg、drawcall_cnt_max、frametime@gt_40_pct、temperature_max。',
140
+ INDICATOR_DASHBOARD_PANEL_GUIDE,
141
+ ].join('\n'),
108
142
  };
109
143
  export function versionGuideFor(opId) {
110
144
  return VERSION_GUIDE[opId];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uwa4d/openapi-mcp",
3
- "version": "0.2.0-beta.5",
3
+ "version": "0.2.0-beta.7",
4
4
  "description": "UWA 开放平台 MCP Server,将 UWA Open API 暴露为 MCP 工具供 AI 助手调用",
5
5
  "type": "module",
6
6
  "bin": {
@@ -20,7 +20,7 @@
20
20
  "access": "public"
21
21
  },
22
22
  "scripts": {
23
- "gen": "tsx scripts/parse-docs.ts",
23
+ "gen": "tsx scripts/extract-dashboard-keys.ts && tsx scripts/parse-docs.ts",
24
24
  "build": "tsc -p tsconfig.json",
25
25
  "dev": "tsx src/cli.ts",
26
26
  "smoke": "tsx scripts/smoke-test.ts",