@@ -20,6 +20,12 @@ export function registerD1Tools(agent: CloudflareMcpAgent) {
2020 page : PaginationPageParam ,
2121 per_page : PaginationPerPageParam ,
2222 } ,
23+ {
24+ title : 'List D1 databases' ,
25+ annotations : {
26+ readOnlyHint : true ,
27+ } ,
28+ } ,
2329 async ( { name, page, per_page } ) => {
2430 const account_id = await agent . getActiveAccountId ( )
2531 if ( ! account_id ) {
@@ -65,6 +71,13 @@ export function registerD1Tools(agent: CloudflareMcpAgent) {
6571 name : D1DatabaseNameParam ,
6672 primary_location_hint : D1DatabasePrimaryLocationHintParam . nullable ( ) . optional ( ) ,
6773 } ,
74+ {
75+ title : 'Create D1 database' ,
76+ annotations : {
77+ readOnlyHint : false ,
78+ destructiveHint : false ,
79+ } ,
80+ } ,
6881 async ( { name, primary_location_hint } ) => {
6982 const account_id = await agent . getActiveAccountId ( )
7083 if ( ! account_id ) {
@@ -103,6 +116,13 @@ export function registerD1Tools(agent: CloudflareMcpAgent) {
103116 'd1_database_delete' ,
104117 'Delete a d1 database in your Cloudflare account' ,
105118 { database_id : z . string ( ) } ,
119+ {
120+ title : 'Delete D1 database' ,
121+ annotations : {
122+ readOnlyHint : false ,
123+ destructiveHint : true ,
124+ } ,
125+ } ,
106126 async ( { database_id } ) => {
107127 const account_id = await agent . getActiveAccountId ( )
108128 if ( ! account_id ) {
@@ -138,6 +158,12 @@ export function registerD1Tools(agent: CloudflareMcpAgent) {
138158 'd1_database_get' ,
139159 'Get a D1 database in your Cloudflare account' ,
140160 { database_id : z . string ( ) } ,
161+ {
162+ title : 'Get D1 database' ,
163+ annotations : {
164+ readOnlyHint : true ,
165+ } ,
166+ } ,
141167 async ( { database_id } ) => {
142168 const account_id = await agent . getActiveAccountId ( )
143169 if ( ! account_id ) {
@@ -178,6 +204,13 @@ export function registerD1Tools(agent: CloudflareMcpAgent) {
178204 sql : D1DatabaseQuerySqlParam ,
179205 params : D1DatabaseQueryParamsParam . nullable ( ) ,
180206 } ,
207+ {
208+ title : 'Query D1 database' ,
209+ annotations : {
210+ readOnlyHint : false ,
211+ destructiveHint : false ,
212+ } ,
213+ } ,
181214 async ( { database_id, sql, params } ) => {
182215 const account_id = await agent . getActiveAccountId ( )
183216 if ( ! account_id ) {
0 commit comments