Skip to content

Commit f4a1198

Browse files
committed
fix: Updated filesystem tools property description.
1 parent f77bac4 commit f4a1198

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/McpServer/Action/Tools/ListToolsAction.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function __invoke(ServerRequestInterface $request): ListToolsResult
6565
'properties' => [
6666
'path' => [
6767
'type' => 'string',
68-
'description' => 'Path to the file',
68+
'description' => 'Path to the file, relative to project root. Only files within project directory can be accessed.',
6969
],
7070
'encoding' => [
7171
'type' => 'string',
@@ -75,7 +75,7 @@ public function __invoke(ServerRequestInterface $request): ListToolsResult
7575
],
7676
'required' => ['path'],
7777
],
78-
'description' => 'Read content from a file',
78+
'description' => 'Read content from a file within the project directory structure',
7979
],
8080
[
8181
'name' => 'file-write',
@@ -84,7 +84,7 @@ public function __invoke(ServerRequestInterface $request): ListToolsResult
8484
'properties' => [
8585
'path' => [
8686
'type' => 'string',
87-
'description' => 'Relative path to the file like src/file.txt',
87+
'description' => 'Relative path to the file (e.g., "src/file.txt"). Path is resolved against project root.',
8888
],
8989
'content' => [
9090
'type' => 'string',
@@ -98,7 +98,7 @@ public function __invoke(ServerRequestInterface $request): ListToolsResult
9898
],
9999
'required' => ['path', 'content'],
100100
],
101-
'description' => 'Write content to a file',
101+
'description' => 'Write content to a file. Can create parent directories automatically.',
102102
],
103103
[
104104
'name' => 'file-rename',
@@ -107,16 +107,16 @@ public function __invoke(ServerRequestInterface $request): ListToolsResult
107107
'properties' => [
108108
'path' => [
109109
'type' => 'string',
110-
'description' => 'Current relative path.',
110+
'description' => 'Current relative path of the file/directory. Must exist within project directory.',
111111
],
112112
'newPath' => [
113113
'type' => 'string',
114-
'description' => 'New relative path',
114+
'description' => 'New relative path for the file/directory. Must remain within project directory.',
115115
],
116116
],
117117
'required' => ['path', 'newPath'],
118118
],
119-
'description' => 'Rename a file or directory',
119+
'description' => 'Rename a file or directory. Verifies source exists and destination doesn\'t.',
120120
],
121121
[
122122
'name' => 'file-move',
@@ -125,11 +125,11 @@ public function __invoke(ServerRequestInterface $request): ListToolsResult
125125
'properties' => [
126126
'source' => [
127127
'type' => 'string',
128-
'description' => 'Source relative path',
128+
'description' => 'Source relative path of the file to move. Must exist within project directory.',
129129
],
130130
'destination' => [
131131
'type' => 'string',
132-
'description' => 'Destination relative path',
132+
'description' => 'Destination relative path where file will be moved. Must remain within project directory.',
133133
],
134134
'createDirectory' => [
135135
'type' => 'boolean',
@@ -139,7 +139,7 @@ public function __invoke(ServerRequestInterface $request): ListToolsResult
139139
],
140140
'required' => ['source', 'destination'],
141141
],
142-
'description' => 'Move a file to another location',
142+
'description' => 'Move a file to another location. Implemented as copy+delete for safety.',
143143
],
144144
[
145145
'name' => 'file-info',
@@ -148,12 +148,12 @@ public function __invoke(ServerRequestInterface $request): ListToolsResult
148148
'properties' => [
149149
'path' => [
150150
'type' => 'string',
151-
'description' => 'Path to the file or directory',
151+
'description' => 'Path to the file or directory, relative to project root. Returns detailed metadata.',
152152
],
153153
],
154154
'required' => ['path'],
155155
],
156-
'description' => 'Get information about a file or directory',
156+
'description' => 'Get information about a file or directory including type, size, permissions, and modification time.',
157157
],
158158
],
159159
];

0 commit comments

Comments
 (0)