Make parameter names more concise in the MCP

This commit is contained in:
2026-03-15 20:04:03 -04:00
parent c68a4ea3b1
commit 2d4ccc6d29
22 changed files with 35 additions and 42 deletions

View File

@@ -20,7 +20,7 @@ class UMCP_Asset_Backup : public UObject, public IMCPHandler
GENERATED_BODY()
public:
UPROPERTY(meta=(Description="Full package path of the asset (e.g. /Game/Widgets/WB_Hotkeys)"))
UPROPERTY(meta=(Description="Asset to back up"))
FString Asset;
virtual FString GetDescription() const override

View File

@@ -23,7 +23,7 @@ class UMCP_Asset_Delete : public UObject, public IMCPHandler
GENERATED_BODY()
public:
UPROPERTY(meta=(Description="Package path of the asset to delete, e.g. /Game/Foo/Bar"))
UPROPERTY(meta=(Description="Asset to delete"))
FString Asset;
UPROPERTY(meta=(Optional, Description="If true, skip reference check and force delete"))

View File

@@ -19,7 +19,7 @@ class UMCP_Asset_FindReferences : public UObject, public IMCPHandler
GENERATED_BODY()
public:
UPROPERTY(meta=(Description="Asset package path to find references for, e.g. /Game/Tangibles/TAN_Tree"))
UPROPERTY(meta=(Description="Asset to find references for"))
FString Asset;
virtual FString GetDescription() const override

View File

@@ -20,10 +20,10 @@ class UMCP_Asset_Rename : public UObject, public IMCPHandler
GENERATED_BODY()
public:
UPROPERTY(meta=(Description="Current package path of the asset, e.g. /Game/Widgets/WB_Hotkeys"))
UPROPERTY(meta=(Description="Asset to rename"))
FString Asset;
UPROPERTY(meta=(Description="New package path (e.g. /Game/Widgets/WB_NewName) or just a new asset name (e.g. WB_NewName)"))
UPROPERTY(meta=(Description="New package path or just a new name"))
FString NewPath;
virtual FString GetDescription() const override

View File

@@ -21,7 +21,7 @@ class UMCP_Asset_Restore : public UObject, public IMCPHandler
GENERATED_BODY()
public:
UPROPERTY(meta=(Description="Full package path of the asset (e.g. /Game/Widgets/WB_Hotkeys)"))
UPROPERTY(meta=(Description="Asset to restore"))
FString Asset;
virtual FString GetDescription() const override

View File

@@ -19,7 +19,7 @@ class UMCP_Editor_OpenAsset : public UObject, public IMCPHandler
GENERATED_BODY()
public:
UPROPERTY(meta=(Description="MCPFetcher path to the asset to open (e.g. /Game/Materials/M_Gold)"))
UPROPERTY(meta=(Description="Asset to open"))
FString Asset;
virtual FString GetDescription() const override

View File

@@ -38,17 +38,16 @@ class UMCP_GraphNode_Create : public UObject, public IMCPHandler
GENERATED_BODY()
public:
UPROPERTY(meta=(Description="Path to a graph, e.g. /Game/Foo,graph:EventGraph"))
UPROPERTY(meta=(Description="Target graph"))
FString Graph;
UPROPERTY(meta=(Description="Array of {actionName, posX, posY} objects. Use GraphNodeSearchTypes to find action names."))
UPROPERTY(meta=(Description="Array of {Type, posX, posY} objects. Use GraphNode_SearchTypes to find types."))
FMCPJsonArray Nodes;
virtual FString GetDescription() const override
{
return TEXT("Create nodes in any graph (Blueprint, Material, etc.) using the editor's action database. "
"Can create ANY node type that appears in the editor's right-click menu. "
"Use GraphNodeSearchTypes first to find the exact action name.");
return TEXT("Create nodes using the editor's action database. "
"Use GraphNode_SearchTypes to find types.");
}
virtual void Handle() override

View File

@@ -23,7 +23,7 @@ class UMCP_GraphNode_Delete : public UObject, public IMCPHandler
GENERATED_BODY()
public:
UPROPERTY(meta=(Description="Path to the node, e.g. /Game/Foo,graph:EventGraph,node:MyNode"))
UPROPERTY(meta=(Description="Node to delete"))
FString Node;
virtual FString GetDescription() const override

View File

@@ -21,7 +21,7 @@ class UMCP_GraphNode_Duplicate : public UObject, public IMCPHandler
GENERATED_BODY()
public:
UPROPERTY(meta=(Description="Path to a graph, e.g. /Game/Foo,graph:EventGraph"))
UPROPERTY(meta=(Description="Target graph"))
FString Graph;
UPROPERTY(meta=(Description="Array of node names to duplicate (as returned by FormatName)"))

View File

@@ -19,7 +19,7 @@ class UMCP_GraphNode_GetComment : public UObject, public IMCPHandler
GENERATED_BODY()
public:
UPROPERTY(meta=(Description="Path to the node, e.g. /Game/Foo,graph:EventGraph,node:MyNode"))
UPROPERTY(meta=(Description="Target node"))
FString Node;
virtual FString GetDescription() const override

View File

@@ -26,7 +26,7 @@ public:
UPROPERTY(meta=(Optional, Description="Maximum number of results (default 50, max 500)"))
int32 MaxResults = 50;
UPROPERTY(meta=(Description="MCPFetcher path to a graph, e.g. /Game/Foo,graph:EventGraph or /Game/Materials/M_Gold,graph:"))
UPROPERTY(meta=(Description="Target graph (needed for context-sensitive results)"))
FString Graph;
virtual FString GetDescription() const override

View File

@@ -19,7 +19,7 @@ class UMCP_GraphNode_SetComment : public UObject, public IMCPHandler
GENERATED_BODY()
public:
UPROPERTY(meta=(Description="Path to the node, e.g. /Game/Foo,node:MyNode"))
UPROPERTY(meta=(Description="Target node"))
FString Node;
UPROPERTY(meta=(Description="Comment text to set"))
@@ -27,7 +27,8 @@ public:
virtual FString GetDescription() const override
{
return TEXT("Set a node's comment text. Makes the comment bubble visible if non-empty.");
return TEXT("Set a node's comment text, and make the comment visible. "
"Setting empty text will cause the comment to vanish.");
}
virtual void Handle() override
@@ -37,13 +38,8 @@ public:
if (!FoundNode) return;
FoundNode->NodeComment = Comment;
// Make the comment bubble visible if setting a non-empty comment
if (!Comment.IsEmpty())
{
FoundNode->bCommentBubbleVisible = true;
FoundNode->bCommentBubblePinned = true;
}
FoundNode->bCommentBubbleVisible = !Comment.IsEmpty();
FoundNode->bCommentBubblePinned = !Comment.IsEmpty();
UMCPServer::Printf(TEXT("Comment set on %s\n"), *MCPUtils::FormatName(FoundNode));
}

View File

@@ -39,7 +39,7 @@ class UMCP_GraphNode_SetDefaults : public UObject, public IMCPHandler
GENERATED_BODY()
public:
UPROPERTY(meta=(Description="Graph path, e.g. /Game/Foo,graph:EventGraph"))
UPROPERTY(meta=(Description="Target graph"))
FString Graph;
UPROPERTY(meta=(Description="Array of {node, name, value} objects"))

View File

@@ -37,7 +37,7 @@ class UMCP_GraphNode_SetPositions : public UObject, public IMCPHandler
GENERATED_BODY()
public:
UPROPERTY(meta=(Description="Path to a graph, e.g. /Game/Foo,graph:EventGraph"))
UPROPERTY(meta=(Description="Target graph"))
FString Graph;
UPROPERTY(meta=(Description="Array of {node, x, y} objects"))

View File

@@ -36,10 +36,10 @@ class UMCP_GraphPin_Connect : public UObject, public IMCPHandler
GENERATED_BODY()
public:
UPROPERTY(meta=(Description="Path to a graph, e.g. /Game/Foo,graph:EventGraph or /Game/Materials/M_Test"))
UPROPERTY(meta=(Description="Target graph"))
FString Graph;
UPROPERTY(meta=(Description="Array of {sourcePin, targetPin} objects. Each pin is a path like node:MyNode,pin:Output"))
UPROPERTY(meta=(Description="Array of {sourcePin, targetPin} objects"))
FMCPJsonArray Connections;
virtual FString GetDescription() const override

View File

@@ -35,10 +35,10 @@ class UMCP_GraphPin_Disconnect : public UObject, public IMCPHandler
GENERATED_BODY()
public:
UPROPERTY(meta=(Description="Path to a graph, e.g. /Game/Foo,graph:EventGraph or /Game/Materials/M_Test"))
UPROPERTY(meta=(Description="Target graph"))
FString Graph;
UPROPERTY(meta=(Description="Array of {pin, targetPin?} objects. Each pin is a path like node:MyNode,pin:Output. If targetPin is omitted, all connections on the pin are broken."))
UPROPERTY(meta=(Description="Array of {pin, targetPin?} objects. If targetPin is omitted, all connections on the pin are broken."))
FMCPJsonArray Disconnections;
virtual FString GetDescription() const override

View File

@@ -20,7 +20,7 @@ class UMCP_MaterialInstance_ClearParameter : public UObject, public IMCPHandler
GENERATED_BODY()
public:
UPROPERTY(meta=(Description="Material Instance path"))
UPROPERTY(meta=(Description="Target material instance"))
FString MaterialInstance;
UPROPERTY(meta=(Description="Parameter name to clear"))

View File

@@ -20,7 +20,7 @@ class UMCP_MaterialInstance_DumpParameters : public UObject, public IMCPHandler
GENERATED_BODY()
public:
UPROPERTY(meta=(Description="Material Instance path"))
UPROPERTY(meta=(Description="Target material instance"))
FString MaterialInstance;
virtual FString GetDescription() const override

View File

@@ -21,7 +21,7 @@ class UMCP_MaterialInstance_SetParameter : public UObject, public IMCPHandler
GENERATED_BODY()
public:
UPROPERTY(meta=(Description="Material Instance path"))
UPROPERTY(meta=(Description="Target material instance"))
FString MaterialInstance;
UPROPERTY(meta=(Description="Parameter name to set"))

View File

@@ -20,7 +20,7 @@ class UMCP_Property_Dump : public UObject, public IMCPHandler
GENERATED_BODY()
public:
UPROPERTY(meta=(Description="MCPFetcher path to the object (e.g. /Game/Materials/M_Gold or /Game/Tangibles/TAN_Char,component:Mesh0)"))
UPROPERTY(meta=(Description="Target object"))
FString Object;
UPROPERTY(meta=(Optional, Description="Substring filter for property names"))
@@ -34,8 +34,7 @@ public:
virtual FString GetDescription() const override
{
return TEXT("List all blueprint-visible properties on an object resolved via MCPFetcher path, "
"showing current values and which properties are editable.");
return TEXT("List all blueprint-visible properties, showing current values and which are editable.");
}
virtual void Handle() override

View File

@@ -19,7 +19,7 @@ class UMCP_Property_Get : public UObject, public IMCPHandler
GENERATED_BODY()
public:
UPROPERTY(meta=(Description="MCPFetcher path to the object (e.g. /Game/Materials/M_Gold or /Game/Tangibles/TAN_Char,component:Mesh0)"))
UPROPERTY(meta=(Description="Target object"))
FString Object;
UPROPERTY(meta=(Description="Property name"))
@@ -27,7 +27,7 @@ public:
virtual FString GetDescription() const override
{
return TEXT("Get the value of a single property on an object resolved via MCPFetcher path.");
return TEXT("Get the value of a single property.");
}
virtual void Handle() override

View File

@@ -19,7 +19,7 @@ class UMCP_Property_Set : public UObject, public IMCPHandler
GENERATED_BODY()
public:
UPROPERTY(meta=(Description="MCPFetcher path to the object (e.g. /Game/Materials/M_Gold or /Game/Tangibles/TAN_Char,component:Mesh0)"))
UPROPERTY(meta=(Description="Target object"))
FString Object;
UPROPERTY(meta=(Description="Object mapping property names to new values in Unreal text format"))
@@ -27,8 +27,7 @@ public:
virtual FString GetDescription() const override
{
return TEXT("Set one or more editable properties on an object resolved via MCPFetcher path. "
"Properties is a JSON object like {\"TwoSided\": \"true\", \"BlendMode\": \"BLEND_Translucent\"}.");
return TEXT("Set one or more editable properties. Values use Unreal text format.");
}
virtual void Handle() override