2828import ghidra .program .model .listing .BookmarkManager ;
2929import ghidra .program .model .listing .Program ;
3030import io .modelcontextprotocol .server .McpSyncServer ;
31- import io .modelcontextprotocol .spec .McpError ;
3231import io .modelcontextprotocol .spec .McpSchema ;
3332import reva .tools .AbstractToolProvider ;
3433import reva .util .SchemaUtil ;
@@ -48,7 +47,7 @@ public BookmarkToolProvider(McpSyncServer server) {
4847 }
4948
5049 @ Override
51- public void registerTools () throws McpError {
50+ public void registerTools () {
5251 registerSetBookmarkTool ();
5352 registerGetBookmarksTool ();
5453 registerRemoveBookmarkTool ();
@@ -58,9 +57,8 @@ public void registerTools() throws McpError {
5857
5958 /**
6059 * Register a tool to set or update a bookmark at an address
61- * @throws McpError if there's an error registering the tool
6260 */
63- private void registerSetBookmarkTool () throws McpError {
61+ private void registerSetBookmarkTool () {
6462 Map <String , Object > properties = new HashMap <>();
6563 properties .put ("programPath" , SchemaUtil .stringProperty ("Path to the program in the Ghidra Project" ));
6664 properties .put ("addressOrSymbol" , SchemaUtil .stringProperty ("Address or symbol name where to set the bookmark" ));
@@ -122,9 +120,8 @@ private void registerSetBookmarkTool() throws McpError {
122120
123121 /**
124122 * Register a tool to get bookmarks at an address or range
125- * @throws McpError if there's an error registering the tool
126123 */
127- private void registerGetBookmarksTool () throws McpError {
124+ private void registerGetBookmarksTool () {
128125 Map <String , Object > properties = new HashMap <>();
129126 properties .put ("programPath" , SchemaUtil .stringProperty ("Path to the program in the Ghidra Project" ));
130127 properties .put ("addressOrSymbol" , SchemaUtil .stringProperty ("Address or symbol name to get bookmarks from (optional if using addressRange)" ));
@@ -222,9 +219,8 @@ private void registerGetBookmarksTool() throws McpError {
222219
223220 /**
224221 * Register a tool to remove a bookmark
225- * @throws McpError if there's an error registering the tool
226222 */
227- private void registerRemoveBookmarkTool () throws McpError {
223+ private void registerRemoveBookmarkTool () {
228224 Map <String , Object > properties = new HashMap <>();
229225 properties .put ("programPath" , SchemaUtil .stringProperty ("Path to the program in the Ghidra Project" ));
230226 properties .put ("addressOrSymbol" , SchemaUtil .stringProperty ("Address or symbol name of the bookmark" ));
@@ -281,9 +277,8 @@ private void registerRemoveBookmarkTool() throws McpError {
281277
282278 /**
283279 * Register a tool to search bookmarks
284- * @throws McpError if there's an error registering the tool
285280 */
286- private void registerSearchBookmarksTool () throws McpError {
281+ private void registerSearchBookmarksTool () {
287282 Map <String , Object > properties = new HashMap <>();
288283 properties .put ("programPath" , SchemaUtil .stringProperty ("Path to the program in the Ghidra Project" ));
289284 properties .put ("searchText" , SchemaUtil .stringProperty ("Text to search for in bookmark comments (optional)" ));
@@ -387,9 +382,8 @@ private void registerSearchBookmarksTool() throws McpError {
387382
388383 /**
389384 * Register a tool to list bookmark categories for a type
390- * @throws McpError if there's an error registering the tool
391385 */
392- private void registerListBookmarkCategoriesTool () throws McpError {
386+ private void registerListBookmarkCategoriesTool () {
393387 Map <String , Object > properties = new HashMap <>();
394388 properties .put ("programPath" , SchemaUtil .stringProperty ("Path to the program in the Ghidra Project" ));
395389 properties .put ("type" , SchemaUtil .stringProperty ("Bookmark type to get categories for" ));
0 commit comments