@@ -62,6 +62,9 @@ pub const READ_WRITE_OPERATIONS: &[&str] = &[
6262 "issue_write" ,
6363 "sub_issue_write" ,
6464 "update_gist" ,
65+ // Pre-emptive entries for anticipated future MCP tools (no equivalent tool today)
66+ // gh agent-task create — creates a Copilot coding-agent job (branch + PR); blocked as unsupported
67+ "create_agent_task" ,
6568] ;
6669
6770/// Check if a tool is a write operation
@@ -121,10 +124,16 @@ pub fn is_unlock_operation(tool_name: &str) -> bool {
121124/// symmetric to `archive_repository` and equally unsupported.
122125/// - `rename_repository`: renames a repository, breaking all clone URLs, webhooks, and external
123126/// references; unsupported as an agent operation.
127+ /// - `create_agent_task`: creates a Copilot coding-agent job that opens a branch and PR;
128+ /// unsupported as a directly invocable agent operation.
124129pub fn is_blocked_tool ( tool_name : & str ) -> bool {
125130 matches ! (
126131 tool_name,
127- "transfer_repository" | "archive_repository" | "unarchive_repository" | "rename_repository"
132+ "transfer_repository"
133+ | "archive_repository"
134+ | "unarchive_repository"
135+ | "rename_repository"
136+ | "create_agent_task"
128137 )
129138}
130139
@@ -210,4 +219,20 @@ mod tests {
210219 ) ;
211220 }
212221 }
222+
223+ #[ test]
224+ fn test_create_agent_task_is_read_write_and_blocked ( ) {
225+ assert ! (
226+ is_read_write_operation( "create_agent_task" ) ,
227+ "create_agent_task must be classified as a read-write operation"
228+ ) ;
229+ assert ! (
230+ is_blocked_tool( "create_agent_task" ) ,
231+ "create_agent_task must be unconditionally blocked (unsupported agent operation)"
232+ ) ;
233+ assert ! (
234+ !is_write_operation( "create_agent_task" ) ,
235+ "create_agent_task should not be in WRITE_OPERATIONS (it is in READ_WRITE_OPERATIONS)"
236+ ) ;
237+ }
213238}
0 commit comments