@Override
	public Set<ToolTemplate> getCompatibleTools(Class<? extends DomainObject> domainClass) {
		Map<String, ToolTemplate> nameToTemplateMap = new HashMap<>();

		//
		// First, get all compatible tools in the tool chest
		//
		ToolTemplate[] toolTemplates = toolChest.getToolTemplates();
		for (ToolTemplate toolTemplate : toolTemplates) {
			Class<?>[] types = toolTemplate.getSupportedDataTypes();
			for (Class<?> clazz : types) {
				if (clazz.isAssignableFrom(domainClass)) {
					nameToTemplateMap.put(toolTemplate.getName(), toolTemplate);
				}
			}
		}

		//
		// Next, check content handler for its default tool name
		//
		try {
			ContentHandler<?> handler = DomainObjectAdapter.getContentHandler(domainClass);
			String defaultToolName = handler.getDefaultToolName();
			if (nameToTemplateMap.get(defaultToolName) == null) {
				ToolTemplate toolChestTemplate = findToolChestToolTemplate(defaultToolName);
				if (toolChestTemplate != null) {
					// found the tool in the tool chest--use that one
					nameToTemplateMap.put(toolChestTemplate.getName(), toolChestTemplate);
				}
				else {
					// see if there is a default tool
					GhidraToolTemplate defaultToolTemplate =
						findDefaultToolTemplate(defaultToolName);
					if (defaultToolTemplate != null) {
						nameToTemplateMap.put(defaultToolTemplate.getName(), defaultToolTemplate);
					}
				}
			}
		}
		catch (IOException e) {
			// Failed to identify content handler
			Msg.error(this, e.getMessage());
		}

		//
		// Finally, see if any of the default tools can handle this type and include any that
		// we haven't already included
		//
		Set<ToolTemplate> defaultTools = ToolUtils.getAllApplicationTools();
		for (ToolTemplate toolTemplate : defaultTools) {
			String toolName = toolTemplate.getName();
			if (nameToTemplateMap.get(toolName) != null) {
				continue; // already have tool in the map by this name; prefer that tool
			}

			Class<?>[] types = toolTemplate.getSupportedDataTypes();
			for (Class<?> clazz : types) {
				if (clazz.isAssignableFrom(domainClass)) {
					nameToTemplateMap.put(toolName, toolTemplate);
				}
			}
		}

		return new HashSet<>(nameToTemplateMap.values());
	}
Implementation of service used to manipulate tools.
Ghidra/Framework/Project/src/main/java/ghidra/framework/project/tool/ToolServicesImpl.java