@Override
    public CloseableIterator execute(ServiceCallContext ctx, final Map params) {
        final boolean verbose = (boolean) params.getOrDefault(Params.VERBOSE, false);
        final String serviceName = (String) params.get(Params.SERVICE);

        return CloseableIterator.of(
                services.values().stream()
                        .filter(s -> serviceName == null || s.getName().equals(serviceName))
                        .map(s -> verbose ? describe(s) : s.getName()).iterator());
    }
{@link DirectoryService} execution. List or describe the registered callable services.
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/service/ServiceRegistry.java