@@ -17,7 +17,14 @@ export function registerFileTools(server: McpServer, config: Config) {
1717 limit : z . number ( ) . int ( ) . min ( 1 ) . max ( 100 ) . default ( 20 ) . describe ( "Maximum number of results to return" ) ,
1818 offset : z . number ( ) . int ( ) . min ( 0 ) . default ( 0 ) . describe ( "Number of items to skip for pagination" ) ,
1919 } ,
20- async ( { projectId, path, branchId, recursive, limit, offset} ) => {
20+ async ( { projectId, path, branchId, recursive, limit, offset} : {
21+ projectId : string
22+ path : string
23+ branchId ?: string
24+ recursive : boolean
25+ limit : number
26+ offset : number
27+ } ) => {
2128 try {
2229 let endpoint = `/v1/projects/${ projectId } /files`
2330 if ( path ) {
@@ -55,7 +62,11 @@ export function registerFileTools(server: McpServer, config: Config) {
5562 path : z . string ( ) . describe ( "Path to the file" ) ,
5663 branchId : z . string ( ) . optional ( ) . describe ( "ID of the branch (optional, defaults to main)" ) ,
5764 } ,
58- async ( { projectId, path, branchId} ) => {
65+ async ( { projectId, path, branchId} : {
66+ projectId : string
67+ path : string
68+ branchId ?: string
69+ } ) => {
5970 try {
6071 let endpoint = `/v1/projects/${ projectId } /files/${ encodeURIComponent ( path ) } /content`
6172 if ( branchId ) {
@@ -98,11 +109,18 @@ export function registerFileTools(server: McpServer, config: Config) {
98109 {
99110 projectId : z . string ( ) . describe ( "ID of the project" ) ,
100111 path : z . string ( ) . describe ( "Path to the new file or directory" ) ,
101- type : z . enum ( [ "file" , "directory" ] ) . describe ( "Type of resource to create" ) ,
112+ type : z . enum ( [ "file" , "interval" , "http" , "email" , "script" , "directory" ] )
113+ . describe ( "Type of resource to create: file, interval, http, email, script, or directory" ) ,
102114 content : z . string ( ) . optional ( ) . describe ( "Content for the file (required for files, not for directories)" ) ,
103115 branchId : z . string ( ) . optional ( ) . describe ( "ID of the branch (optional, defaults to main)" ) ,
104116 } ,
105- async ( { projectId, path, type, content, branchId} ) => {
117+ async ( { projectId, path, type, content, branchId} : {
118+ projectId : string
119+ path : string
120+ type : "file" | "interval" | "http" | "email" | "script" | "directory"
121+ content ?: string
122+ branchId ?: string
123+ } ) => {
106124 try {
107125 // Validate that content is provided for files
108126 if ( type === "file" && content === undefined ) {
@@ -149,7 +167,12 @@ export function registerFileTools(server: McpServer, config: Config) {
149167 content : z . string ( ) . describe ( "New content for the file" ) ,
150168 branchId : z . string ( ) . optional ( ) . describe ( "ID of the branch (optional, defaults to main)" ) ,
151169 } ,
152- async ( { projectId, path, content, branchId} ) => {
170+ async ( { projectId, path, content, branchId} : {
171+ projectId : string
172+ path : string
173+ content : string
174+ branchId ?: string
175+ } ) => {
153176 try {
154177 let endpoint = `/v1/projects/${ projectId } /files/${ encodeURIComponent ( path ) } `
155178 if ( branchId ) {
@@ -182,7 +205,11 @@ export function registerFileTools(server: McpServer, config: Config) {
182205 path : z . string ( ) . describe ( "Path to the file or directory" ) ,
183206 branchId : z . string ( ) . optional ( ) . describe ( "ID of the branch (optional, defaults to main)" ) ,
184207 } ,
185- async ( { projectId, path, branchId} ) => {
208+ async ( { projectId, path, branchId} : {
209+ projectId : string
210+ path : string
211+ branchId ?: string
212+ } ) => {
186213 try {
187214 let endpoint = `/v1/projects/${ projectId } /files/${ encodeURIComponent ( path ) } `
188215 if ( branchId ) {
0 commit comments